Tracking outbound links


#1

greetings
I want to know if I can track links from my site to outbound sites.
For instance I create a link to “www.example.com” and I want to track it how many people click on that link. Is this possible?
(something like this: www.mysite.con/piwikfolder/?url=www.example.com)


(vipsoft) #2

Outlinks can be tracking using enableLinkTracking() in the JavaScript tracking code.

Your example, however, looks like a redirect. You can either use a trackLink() + page load on a short-lived redirect page, or use the server-side PiwikTracker in your redirect script.


#3

this example?
Link I want to track as an outlink


(vipsoft) #4

Yes. The “piwik_link” is optional if the site is clearly an outlink.