Expand my Community achievements bar.

SOLVED

Events are firing multiple times

Avatar

Level 2

We have a Event 11 to fire when a file was downloaded, such as pdf's. We also have a link click event 9 to fire for all the links on the site. However, when a PDF was downloaded, I am seeing file download event (event11) firing twice. It is firing once as a separate event and also firing second time along with link click event (event9). Wondering why it is incorporating Event 11 with Event9 when it is fired. Below are some of the screenshots and would really appreciate any suggestions/solutions: 

File Download (Event 11) call:

vallus_0-1660231006530.png

Link Click (Event 9) call:

vallus_1-1660231100889.png

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I assume that you have the following setup:

  • Automatic link tracking for file downloads, which includes the ".pdf" file extension
  • Custom link tracking with event9 (as you've described)

If so, then I believe this is what is happening: when a user clicks a link that links to a ".pdf" file, the following occurs:

  1. Your Rule that sets event11 runs, because the user had clicked a ".pdf" link.
  2. AA's automatic link tracking runs, because the user had clicked a link that is a ".pdf" file extension, and sends its beacon. This beacon also sends event11, because it got set above.
  3. Your custom link tracking then runs, because the user had clicked a link, and sends its beacon. This beacon sends event9 because of the custom link tracking, but also event11, because it got set at step 1 above.

You have 2 options here:

  1. Disable automatic link tracking. Note, though, that this generally isn't advised, because you could miss out on tracking link clicks for lots of other files that might be available in your website.
  2. In your custom link tracking, set "s.linkTrackEvents" to only track "event9". This might be the easiest solution, though it could backfire, if you expect other events to be tracked with this custom link tracking in other scenarios than the one you've described.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

I assume that you have the following setup:

  • Automatic link tracking for file downloads, which includes the ".pdf" file extension
  • Custom link tracking with event9 (as you've described)

If so, then I believe this is what is happening: when a user clicks a link that links to a ".pdf" file, the following occurs:

  1. Your Rule that sets event11 runs, because the user had clicked a ".pdf" link.
  2. AA's automatic link tracking runs, because the user had clicked a link that is a ".pdf" file extension, and sends its beacon. This beacon also sends event11, because it got set above.
  3. Your custom link tracking then runs, because the user had clicked a link, and sends its beacon. This beacon sends event9 because of the custom link tracking, but also event11, because it got set at step 1 above.

You have 2 options here:

  1. Disable automatic link tracking. Note, though, that this generally isn't advised, because you could miss out on tracking link clicks for lots of other files that might be available in your website.
  2. In your custom link tracking, set "s.linkTrackEvents" to only track "event9". This might be the easiest solution, though it could backfire, if you expect other events to be tracked with this custom link tracking in other scenarios than the one you've described.