How can I disable Context Data? | Community
Skip to main content
adilk
New Participant
April 13, 2019
Solved

How can I disable Context Data?

  • April 13, 2019
  • 19 replies
  • 16569 views

Do I need to do this in Adobe Launch or if in AA settings, where can I get this done?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Asheesh_Pandey

There are folwing ways you can disable activity map contextData.

1. Disable clickmap in AA tool. (update AA version to v1.7.4 if you do not find an option within link tracking section).

2. set any of the following code in do-plugin section under custom code in AA tool.

s.ActivityMap.linkExclusions

// Exclude links tagged with a special linkExcluded CSS class

<span class="linkExcluded">exclude-link1</span> //DOM example

<span class="linkExcluded">exclude-link2</span> //DOM example

s.ActivityMap.linkExclusions = 'exclude-link1,exclude-link2'; //custom code to be used

Note: It is a string that receives a comma-separated list of strings to search for in link text. If found, then the link is excluded from being tracked by Activity Map.

s.ActivityMap.regionExclusions

// Exclude regions on the page from its links being trackable by ActivityMap

<div id="links-excluded"> //DOM example

s.ActivityMap.regionExclusions = 'links-excluded'; //custom code to be used

Note: It is a string that receives a comma-separated list of strings to search for in region text. If found, then the link is excluded from being tracked by Activity Map.

If you don't want activity map to fire at all, find a common global div id which exists on all pages and exclude that with the help of s.ActivityMap.regionExclusions. i.e. home etc.

Thanks,

Asheesh

19 replies

jantzen_b
Employee
March 24, 2020
Do any of the answers below answer your initial question? If so, can you select one of them as the correct answer? If none of the answers already provided answer your question, can you provide additional information to better help the community solve your question?
adilk
adilkAuthor
New Participant
April 25, 2019

Hi Thomas,

So, I found out in debugging that the extra page hit was due to a Direct Call happening with the same name [as page load rule] causing it. Thanks a lot, appreciate it!

adilk
adilkAuthor
New Participant
April 24, 2019

Thanks, Thomas.

I had drafted a reply but debugging a few things with devs for now.

I placed your script as an exclusion and contextData is now not showing in debugger. On specific pages [form step pages], AA page hit is firing twice. I setup a console log action for it in my Launch rule [after sending beacon] and it seems to be the case. Will clear that out + check with your script and it should work. Will update this thread in a bit. Thanks again!

New Participant
April 24, 2019

Now I did some test on an dev environment and my code snippet seems to work.

New Participant
April 24, 2019

I haven't actually tested this out yet, I just came up with it because of the documentation. But yes, it would belong into the custom code section where you also would define plugins.

adilk
adilkAuthor
New Participant
April 23, 2019

Hi Thomas,

If I were to try this, would this go under Launch Extensions > AA > Configure > Configure Tracker Using Custom Code section?

Also, the AppMeasurement.js will contain contextData section but the above setting will block it from sending to AA?

Thanks.

adilk
adilkAuthor
New Participant
April 23, 2019

Thanks, Asheesh. I'm working with my devs to try out this option. I would honestly prefer this one as loading a custom AppMeasurement library is causing some unexpected changes in prop level variable info. on page load. If I can use the standard AppMeasurement JS [containing activitymap details] and combine it with your method of s.ActivityMap.regionExclusions, that would be great. I would need to place the exclusion in Adobe Launch > Extensions > Adobe Analytics > Configure > Configure Tracker Using Custom Code section, correct?

New Participant
April 23, 2019

Thanks Asheesh for this other solution, which I didn't know of.

But still why include a large snippet of code if you don't wanna use it anyway. So I am looking forward to a future version of the Analytics Extension where this can be configured to not be inculuded at all. Maybe this solution also contains a UI for setting these exlusion classes...

EDIT: I think I found another solution to completely disable it. Just override the link function:

Link Tracking Methodology

"If the return value is false (null, undefined, empty string, 0), no link is tracked."

So I just add this in the custom code section of the Analytics Extension:

if (typeof s.ActivityMap === 'object') {

   s.ActivityMap.link = function() {

   return false;

  };

}

Asheesh_Pandey
Asheesh_PandeyAccepted solution
New Participant
April 23, 2019

There are folwing ways you can disable activity map contextData.

1. Disable clickmap in AA tool. (update AA version to v1.7.4 if you do not find an option within link tracking section).

2. set any of the following code in do-plugin section under custom code in AA tool.

s.ActivityMap.linkExclusions

// Exclude links tagged with a special linkExcluded CSS class

<span class="linkExcluded">exclude-link1</span> //DOM example

<span class="linkExcluded">exclude-link2</span> //DOM example

s.ActivityMap.linkExclusions = 'exclude-link1,exclude-link2'; //custom code to be used

Note: It is a string that receives a comma-separated list of strings to search for in link text. If found, then the link is excluded from being tracked by Activity Map.

s.ActivityMap.regionExclusions

// Exclude regions on the page from its links being trackable by ActivityMap

<div id="links-excluded"> //DOM example

s.ActivityMap.regionExclusions = 'links-excluded'; //custom code to be used

Note: It is a string that receives a comma-separated list of strings to search for in region text. If found, then the link is excluded from being tracked by Activity Map.

If you don't want activity map to fire at all, find a common global div id which exists on all pages and exclude that with the help of s.ActivityMap.regionExclusions. i.e. home etc.

Thanks,

Asheesh

New Participant
April 17, 2019

I just checked it on our instance and it seems the code editor can't handle the minimized script.

Beside that, you are posting it in the wrong location. See the screenshots here for the right place:

https://forums.adobe.com/ideas/9783

But I never did this myself, so I am not sure if you need to provide other script parts inside it to make it work. Maybe the OP of that Idea or an Adobe staff member could shed some light on it.

We only use Launch to generate the scripts and host them ourself, so we download a zip and then replace the included AppMeasurement.js with the modified one.