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:
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:
Your Rule that sets event11 runs, because the user had clicked a ".pdf" link.
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.
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:
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.
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.