Expand my Community achievements bar.

SOLVED

Disable Adobe Analytics extension in custom code

Avatar

Level 2

Hi everyone!

I seem to remember in DTM you could add a condition with 'return false' to the custom code for the Adobe Analytics extension and it would prevent it from being deployed on that page.

It's been a while since I've used Launch and there is a similar requirement to only deploy Adobe Analytics to certain pages. I wondered if I could do the same in Launch by adding the site sections where I don't want Analytics to fire into the custom code section?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

There are two ways.

One is using any condition in the Adobe Launch rule, any of them returning false will stop the rule from firing.

Another one is setting s.abort in the Adobe Analytics extension custom code, which is what you are referring to. Actually, this one is setting to true (not false) to stop AA firing, and here is the official document, https://experienceleague.adobe.com/docs/analytics/implementation/vars/config-vars/abort.html?lang=en

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

There are two ways.

One is using any condition in the Adobe Launch rule, any of them returning false will stop the rule from firing.

Another one is setting s.abort in the Adobe Analytics extension custom code, which is what you are referring to. Actually, this one is setting to true (not false) to stop AA firing, and here is the official document, https://experienceleague.adobe.com/docs/analytics/implementation/vars/config-vars/abort.html?lang=en

Avatar

Level 2

s.abort is an option. What I was referring to also was adding something like this to the custom code of the Adobe Analytics extension:

 

if(window.location.href === "Page Where I Don't Want Analytics to Fire"){
    return false
}