michaelp
michaelp

Reputation: 363

Adobe Analytics event firing on every page

I'm using DTM to implement Adobe Analytics code on a single page app.

I have a link that we've set up successfully as an exit link and it fires as it should. If this matters, it opens in a new tab and we don't actually exit the website. However, any time we fire off any subsequent page views, we see the same event fired. Is there any way to fire off this event only when the link actually is clicked? I assume that because it's a one page app and the code isn't getting refreshed that is the reason it's on every subsequent page.

Upvotes: 1

Views: 710

Answers (2)

Jakub Otrząsek
Jakub Otrząsek

Reputation: 66

Please check witch version of s_code you are using, if you are using Appmeasurement or one of the last s_code versions please use clearkVars() function. following code is a log from browser console with console responses:

s.events ="event1"
"event1"
s.linkTrackVars='events';
"events"
s.eVar1="value"
"value"
s.clearVars();
undefined
s.events
undefined
s.eVar1
undefined

you can fire this in custom code section (if your custom code section is set to fire after gui settings, or you can fire it as JavaScript 3rd party tag.

Upvotes: 1

BrettAHale
BrettAHale

Reputation: 800

Using Adobe Analytics and DTM is frustrating with single page apps. What we do is clear all the variables that are set before each page view. We have a function that clears, props, evars, events, listVars, heir, pageName etc.

Upvotes: 3

Related Questions