I have search high and low in the forums and in google but I still can’t find an answer to what I’m looking for.
I have a review site (eg. myreview.com), and use a plugin to cloak my affiliate links going to merchant sites like http://www.amazon.com/Casio-GW9200-1-G-Shock-Riseman-Alti-Therm/dp/B001A62M04/ref=amb_link_19995401_11?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-3&pf_rd_r=1W1Z91MJ3EMA78GKZ6N5&pf_rd_t=101&pf_rd_p=488790311&pf_rd_i=507846 to a “pretty link” like http://myreview.com/visit/amazon
I want to be able to track the cloaked affiliate link --> http://myreview.com/visit/amazon in goals so I can see how many times my affiliate links gets clicked on.
In creating a goal, when goal is triggered when visitors --> do I choose:
Option 1 --> Visit a given URL (page or group of pages)
where the URL (it says Page Title by the way which I think is wrong) contains “http://myreview.com/visit/” or just “visit/” is enough?
Option 4 --> Click on a Link to an external website
where the external website URL contains amazon.com?
I am confused as to which above mentioned option is the correct one to use. The cloaked link is obviously for an external website, but the cloaking plugin uses my site’s URL to mask the affiliate link.
Any help with this would be greatly appreciated.
In this case, it’s a bit different, because the link is neither external (option 4 will not work), and it is not a “Page view” as such, because the JS tracker is not executed in your cloacked page (option 1 will not work).
In your cloaking page, instead of redirecting directly to the URL, have a HTML page load, with the Piwik JS code in it, and redirect the visitor after 1 second to your affiliate URL
In your cloacking page (for example doing the redirect in PHP), you can use the tracking API and trigger the goal manually: Tracking API - Analytics Platform - Matomo
Thanks for your response, but I am having difficulty understanding the jargon…
What do you mean by “cloaking page”?
How do you do a HTML page load with the Piwik JS code in it?
Do both the solutions you provided above stop me from using the plugin on my wordpress site?
I just tried to read the Piwik Tracking API page you directed me to, and it is way over my head to understand…
Do you know of any other analytics solutions that can track cloaked affiliate links?
Will this feature be added into piwik in the future?
Currently, what is the code source of your page that redirects to amazon?
you could write something like
<meta http-equiv="refresh" content="1;url=http://amazon.com/xyz/">
PIWIK JS CODE HERE
Hello, great post thank you for the input.
(location.href = ? Maybe )
Does option 1 (Visit a given URL) have to be an Internal website where Piwik has stats pages on it?