Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

thomas_amsler
Level 9
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
thomas_amsler
Correct answer by
Level 9
Level 9

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

View solution in original post

1 Reply
thomas_amsler
Correct answer by
Level 9
Level 9

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

View solution in original post