Activity Map - Can I add more context to the click tracking?
The activity map is great to understand what's happening on the page without separate setup for many interactive elements.
Unfortunately, the extension is still broken (due Chrome updates, and yes I know there is a workaround), but the information is still usable in the Workspace.
Now, it seems that these are the values that an actitivity map click may transport
- clickedElement: The DOM element that was clicked
- pageName: The page name when the click happened
- linkName: The name of the clicked link
- linkRegion: The region of the clicked link
- linkType: The type of link (typically exit, download, or other)
- linkUrl: The destination URL of the clicked link
But, there is a lot of context missing to fully understand where this click happened. Hence, it would be awesome if I could add information that is present in any other tracking call with the ActivityMap click.
So, is it actually possible to enrich this with additional context data payload like for instance parts of the data layer (which I then obviously have to map via processing rules)?
Has anyone ever tried this out and has an opinion on this?
UPDATE:
The Web SDK's "on before event callback" seems to give me some possibility to modify the XDM before sending.

// Modify content.xdm or content.data as necessary. There is no need to wrap the
// code in a function or return a value. For example:
// content.xdm.web.webPageDetails.name = "Checkout";
let activityMap = content?.data?.__adobe?.analytics?.contextData?.a?.activitymap;
if (activityMap) {
// enrich with additional information
activityMap.foo = "bar";
}
_satellite.logger.debug(`>>> on before event send: ${JSON.stringify(content,null,2)}`);

UPDATE 2:
I updated my "on before event send" callback now to pull additional information from data element to enrich the context with what I need to better understand and segment interaction by let's say language and page country. And it works fine!
let activityMap = content?.data?.__adobe?.analytics?.contextData?.a?.activitymap;
if (activityMap) {
// enrich with pageName and pageURL if not present
content.data.__adobe.analytics.eVar4 = _satellite.getVar("Page Country", event);
content.data.__adobe.analytics.eVar5 = _satellite.getVar("Page Language", event);
}
Now what? 😄 This question is kind of answered, just if anyone could give their two cents 🙂on this as well, and I can sleep better at night.
Obviously, the Activity Map was built for one specific purpose: an overlay on the browser (which currently / has not been working for a while now).
So, adding more context will obviously not be made visible in that extension. But should that keep us from hacking it?
