Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Clear Variable for lnk_e and lnk_d

Avatar

Level 9

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

View solution in original post

4 Replies

Avatar

Level 9

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.

Avatar

Level 10
Sorry we missed you. The community does our best to answer everyone's question but if you need an immediate answer, opening a ticket with customer care is your best bet.

Avatar

Correct answer by
Level 10

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.