Expand my Community achievements bar.

SOLVED

Validating AEP Web SDK Send event with "Document will unload" checked

Avatar

Level 2

I am in the process of migrating an Adobe Launch Adobe Analytics Extension (AppMeasurement) implementation to an Adobe Launch Adobe Experience Platform Web SDK Extension (Alloy) implementation. My implementation includes custom click tracking of links and buttons. In my legacy AppMeasurement implementation, I have a Launch rule that listens for the click of HTML <a> or <button> tags and makes a Send Beacon: s.tl() call to send an Analytics conversion event and some eVars with data about the <a> or <button> that was clicked to my Analytics report suite.

 

I have recreated the same rule using the AEP Web SDK to make a Send event: Web Webinteraction Link Clicks call including an XDM payload containing the needed JSON for the Analytics conversion event and eVars. The new implementation works as expected in most cases, but some of the links and buttons being tracked cause a navigation away from the given page. I am seeing race conditions whereby the page unloads before the AEP Web SDK Send event request completes which results in the request being aborted by the browser and never making it to the AEP Edge and therefore never making it to my Analytics report suite.

 

It is my understanding that the way to avoid these types of race conditions is to check the Document will unload checkbox within the Send event rule:

Joe_Y_1_0-1719938907807.png

 

Unfortunately, when I try this my web.webinteraction.linkClicks interact event requests get changed to collect event requests. The Adobe Experience Platform Debugger doesn't seem to be able to capture the JSON payload details of collect event requests the way it does for the web.webinteraction.linkClicks interact event requests. Within the Adobe Experience Platform Debugger, the only information captured for the collect event requests is the configId and requestId. This makes client-side validation impossible.

 

I am also not finding an Alloy Request record in my Adobe Experience Platform Assurance session for these collect event requests.

 

Is this to be expected? Is my understanding of the purpose of the Document will unload checkbox within the Send event rule correct? Is there some other way that I can conduct validation besides waiting for data to show up on the server in my AEP dataset or my Analytics report suite?

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi @Joe_Y_1 

you are correct document unload will help you send event to adobe even if your page page unloads too quickly the downside is since you won't get a response back from servers you won't find any payload in network calls and in debuggers.

 

however you can use the event object to log some data related to HTML <a> and <buttons> tags with click events by creating a new custom action before send event action in your rule

 

_satellite.logger.log("Link Detail",JSON.stringify(event.message.linkInfo));

 

 

If you are scraping the DOM to capture link name, link URLs then this would provide you some idea on what values are being sent to some of your variables.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 5

Hi @Joe_Y_1 

you are correct document unload will help you send event to adobe even if your page page unloads too quickly the downside is since you won't get a response back from servers you won't find any payload in network calls and in debuggers.

 

however you can use the event object to log some data related to HTML <a> and <buttons> tags with click events by creating a new custom action before send event action in your rule

 

_satellite.logger.log("Link Detail",JSON.stringify(event.message.linkInfo));

 

 

If you are scraping the DOM to capture link name, link URLs then this would provide you some idea on what values are being sent to some of your variables.