hi all, based on the adobe documentation clickCollection.eventGroupingEnabled is a boolean that determines if the library waits until the next page to send link tracking data (clickCollection | Adobe Data Collection). Have tried setting it to "true" and the event bundling does not work. The existing appMeasurement set up does the trick - activity map is being surfaced on the next pageload. Want to have the exact set up in the web sdk. Would appreciate if anyone could help. Thanks
Solved! Go to Solution.
Hi @Franc_G
little update on this one. So, I looked at the alloy.js code which has a function hasPageName that internally called in onBeforeEvent and expects xdm.web.webPageDetails.name to be set to detect page views. Also mentions that ideally, the event type should be "web.webpagedetails.pageViews" (which is commented and not in use).
Both is a little problematic in my opinion since these days, you are not obliged to set these values to have a working analytics solution if you use WebSDK UX to set data variables instead of going for an XDM schema.
Long story, it still does not work for me though
Sent it to support, maybe they have an idea. But maybe worth checking if you can make it work on your end
Hi @Franc_G
yeah, it does not seem to work for me either. I actually have a call tomorrow 11:30am CEST with Adobe support about this
Send me a DM if you want to hop on the call.
Björn
Hi @Franc_G
little update on this one. So, I looked at the alloy.js code which has a function hasPageName that internally called in onBeforeEvent and expects xdm.web.webPageDetails.name to be set to detect page views. Also mentions that ideally, the event type should be "web.webpagedetails.pageViews" (which is commented and not in use).
Both is a little problematic in my opinion since these days, you are not obliged to set these values to have a working analytics solution if you use WebSDK UX to set data variables instead of going for an XDM schema.
Long story, it still does not work for me though
Sent it to support, maybe they have an idea. But maybe worth checking if you can make it work on your end
@bjoern__koth a bit of a tricky one. I will raise a ticket with Adobe - this is what our customer support has suggested.
In the current setup (without event grouping), the activity map is not amazing. It will results in an enormous amount of extra requests. Any nav link, toolbar, tab will result in an additional server request. Adobe needs to sort this out. I can see a lot of clients being unhappy once they see the server request quota limits being breached.
Putting this on hold for now.
Views
Replies
Total Likes
I mean it should not be rocket science. You can persist the data yourself in the WebSDK's "Edit filter click properties callback code" and can abort the execution with "return false" if needed.
try {
// persist the data in sessionStorage
const payload = {
link: encodeURIComponent(content.linkName),
page: encodeURIComponent(content.pageName),
region: encodeURIComponent(content.linkRegion),
pageIDType: content.pageName ? 1 : 0,
};
sessionStorage.setItem("prev_activityMap", JSON.stringify(payload));
// abort execution
return false;
} catch (error) {
_satellite.logger.error(">>> ActivityMap - filterClickDetails error", error);
}
And from there on, in the page view, we will have to pull it out and set it on the data.__adobe.analytics.contextData.a.activityMap object
In my case, I use an "Update variable" WebSDK action's custom code block.
// try to read previous ActivityMap item from sessionStorage
try {
let prev_activityMap = JSON.parse(sessionStorage.getItem("prev_activityMap"));
if (Object.keys(prev_activityMap).length > 0) {
content.__adobe.analytics.contextData = content.__adobe.analytics.contextData || {};
content.__adobe.analytics.contextData.a = content.__adobe.analytics.contextData.a || {};
content.__adobe.analytics.contextData.a.activitymap = content.__adobe.analytics.contextData.a.activitymap || {};
// iterate over sessionStorage item and fill activitymap context data
for (const [key, value] of Object.entries(prev_activityMap)) {
content.__adobe.analytics.contextData.a.activitymap[key] = decodeURIComponent(value);
}
// remove sessionStorage item
sessionStorage.removeItem("prev_activityMap");
_satellite.logger.debug(">>> ActivityMap applied", content.__adobe.analytics.contextData.a.activitymap);
}
} catch (error) {
_satellite.logger.error(">>> ActivityMap - filterClickDetails error", error);
}
This seems to work on my end at least but again, should work out of the box.
Also, I do not really like that you can only capture that one event.
So, maybe a hybrid approach could be best. Meaning, we can check if the clicked link URL is actually navigating away on another page and if not, still trigger the activitymap right away to not lose interactions without page navigation?
@bjoern__koth thanks for the above - definitely a valid back up option. I have raised a ticket with adobe customer support and their engineers are looking into it. Would really prefer for this to work out of the box, but its good to have a back up option
Weirdly enough, on my end, out of the box solution works on SPAs, but it does not work on non-SPA pages. But then again, I am using a different TMS (Ensighten and not Launch).
Interesting, but could Ensighten have an older version of the WebSDK where it still works,
@Jennifer_Dungan mentioned that her approach suddenly stopped working.
Views
Replies
Total Likes
Hi @Franc_G
had the session with support, they will look into the issue. According to the agent, he would also assume that the sessionStorage value is picked up upon and request on the next page.
He will investigate with the WebSDK team and come back to me next week.
Cheers
Thanks for the update, much appreciated.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies