sendBeacon and _satellite.track with custom code actions | Community
Skip to main content
Jones2222
New Participant
September 1, 2020
Solved

sendBeacon and _satellite.track with custom code actions

  • September 1, 2020
  • 1 reply
  • 1984 views

Hi all,

 

I have questions regarding the execution of _satellite.track calls in conjunction with 's.useBeacon = true' in Adobe Launch. Could someone please validate my assumptions for Adobe Launch?

 

Scenario 1: 

I trigger a _satelitte.track('xxx') via an onbeforeunload listener. The associated rule has a custom code action block where I interacting directly with the s object via s.tl(..). 's.useBeacon' is set to true.

 

 

Assumption: It's not given that tracking call is executed successfully, because custom code is not embedded within the main library and loaded asynchronously as a sperate file. This leads to a race condition, even with 's.useBeacon = true'.

 

Scenario 2: 

 

Same as above, with the difference that I use the Adobe Analytics extensions and a setVar + sendBeacon actions instead of custom code.

 

Assumption: It's given that tracking call is executed successfully because _satelitte.track is executed synchronously with associated code included in main library. s.useBeacon ensures request is sent even with the imminent page unload.

 

Is this assumption correct? 

 

Thanks a lot in advance!

Jones

 

 

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 yuhui-bc

Yes, your assumptions are correct.

In general, Custom Code actions are loaded via separate JS files. So you will face a race condition in Scenario 1 where the browser is loading that JS file for your action, but then the browser also redirects to the next page.

1 reply

yuhui-bc
yuhui-bcAccepted solution
New Participant
September 8, 2020

Yes, your assumptions are correct.

In general, Custom Code actions are loaded via separate JS files. So you will face a race condition in Scenario 1 where the browser is loading that JS file for your action, but then the browser also redirects to the next page.

Jones2222
Jones2222Author
New Participant
September 14, 2020
Hi Yuhui, Thanks a lot for confirming!