How to prevent the default download link to trigger under certain conditions?



We would like to keep the default download link tracking configured in the Analytics Extension's "Link Tracking" section with the default file extensions in place. But there are a few lightboxes which should not count towards a download. But as there is no specific rule for these, and the lnk_d is triggered automatically, how can I add some conditions? Can I prevent the tracking somehow in the custom doPlugins method?

And a small side question, related to this, how can i clear the variables after this automatic lnk_d tracking?

I have the following code in the doPlugins where these variables are also sent with the next custom link on the same page:

if (s.linkType === 'd') {

  s.linkTrackVars = 'events,eVar11,prop11';

  s.linkTrackEvents = 'event4'; = 'event4';

  s.eVar11 = s.linkURL.split('/').pop();

  s.prop11 = 'D=v11';


Answers (0)