Switch links of WordPress Site based on referrer

there is a problem when trying to track amazon affiliate links and using AdWords. I want to know if using AdWords will generate more revenue, but at the moment (as far as I know) it is only possible to check how many people click on an affiliate link, that were generated by AdWords (I use external Link tracking in Analytics and paid search as source for that).

But for real tracking I need to know if the clicks on affiliate links also lead to sellings in Amazon. My idea:

I have at the moment a lot amzn.xxx links, so shortened Amazon links. I want to switch all links to a different link, if the user comes from Amazon. Some kind of a WordPress Filter, where I check which link should be outputted and then changed to a different link. Then I could track it in Amazon.

Is it possible to switch links in an output filter in WP?

Thanks for help.


Read more here: Switch links of WordPress Site based on referrer

Leave a Reply

Your email address will not be published. Required fields are marked *