Then, do you get some of the the money from the gold province as tariff?
Another small question. As Denmark, my trade port is Lubeck. I'm building a colony on the ivory coast (Ouest Africa) and may get some gold province later on. The trade route to Lubeck is very long as it goes to through the Caribbean, East america and Canada before crossing the Atlantic to Lubeck. Will the gold fleet take this route even if it is very long (with probably some pirates).
Finally, does hunting pirates in some trade nodes (Caribbeans for instance) reduce the gold taken from the gold fleet on the way?
I have not tested it myself but I have seen others report that gold provinces in Colonial Nations that cannot send treasure fleets do feed through into tariffs. It has even been suggested that you can get a better return from developing your CNs gold provinces in such circumstances than you would from developing anywhere else.
African gold provinces will never be part of a Colonial Nation so if you get gold provinces in the Ivory Coast region you will get the gold income yourself as normal. It may be worthwhile putting those provinces into a state rather than a trade company in order to get maximum benefit from them.
If you are getting treasure fleets and they are being intercepted by pirates then, yes, pirate hunting will help but you have to be hunting pirates in the node or nodes where the pirates are intercepting the fleet. The pop up does not tell you where the pirates are operating and the route the treasure fleet has taken is not shown on the map so it can be difficult to work out which nodes need pirate hunters to protect the gold. In practice, it is rarely worth doing it just for your treasure fleets as the gold taken is not usually very much.