Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

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

Avatar

Level 9

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';

  s.events = 'event4';

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

  s.prop11 = 'D=v11';

}

1 Accepted Solution

Avatar

Correct answer by
Level 9

I found the s.abort flag which seems to do what I want.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 9

I found the s.abort flag which seems to do what I want.