trackLink or trackEvent

Hi, we are using enableLinkTracking throughout our website. It is working fine. We regularly generate reports on our outlinks.

But, now the client wants the ability to differentiate some outlinks from other outlinks. Eg, if the outlink meets condition xyz then we want, to be able to know that this is an XYZoutlink. It is not possible to know this from the target URL, or the title of the target URL but it is possible to know this from the source URL.

Basically, if an outlink is on page XYZ, then we want to see that in the Piwik reoprt.
What do I need to do? Should I use trackLink(url, linkType, nameXYZ)? Should I use custom variables? Should I use trackEvent?

Couldn’t you just do this with a custom segment?

Create a segment > Action > Page URL (add more than 1 if needed), cause you say you know the source URL.

Enable the segment, go to the outlinks and this will only show you the outlinks coming from that specific URL (or URLs).

1 Like