We configured the Analytics Extension to automatically track exit and download links for certain domains and extensions respectively. There is also a doPlugins which adds some events and eVars to these with something like this:
if (s.linkType === 'd') {
// set some eVars and events
} else if (s.linkType === 'e') {
// set some other eVars and events
}
This works fine, but as this isn't a rule where I have full control over the actions, events and evars set here, are repeated with the next rule that is fired. We created all the rules with the Clear Variable action at the end, but now it seems, we should have put it first, before setting the new variables. Is this the only way to make sure these eVars and events are cleared before the next rule fires? Or is there a way to tell the Analytics Extension to clear variables also for these two automatic link trackings?
Solved! Go to Solution.
Views
Replies
Total Likes
There are almost an unlimited amount of ways to do most things in Launch. If you want to have the Analytics Extension run code that sets variables, you will need to clear those variable first in any rule where you didn't want those variable included. Alternatively, you could likely take the code out of the Analytics extension and create rule to accomplish the same task. This would give you the flexibility of adding conditions to the rule and only having those variable set when they should be set rather than globally.
Views
Replies
Total Likes
No answer to this after almost 2 months, so I assume I have to find another solution, like clearing stuff myself in the doPlugins. So I need to find out if this method gets executed before or after my Set Variables actions within the rules.
Views
Replies
Total Likes
Views
Replies
Total Likes
Perhaps prior to setting events for these link types you could add the s.clearVars() ?
There are almost an unlimited amount of ways to do most things in Launch. If you want to have the Analytics Extension run code that sets variables, you will need to clear those variable first in any rule where you didn't want those variable included. Alternatively, you could likely take the code out of the Analytics extension and create rule to accomplish the same task. This would give you the flexibility of adding conditions to the rule and only having those variable set when they should be set rather than globally.
Views
Replies
Total Likes