Ensuring ACDL persistence across pageloads with Web SDK using Adobe Launch | Community
Skip to main content
November 8, 2024
Question

Ensuring ACDL persistence across pageloads with Web SDK using Adobe Launch

  • November 8, 2024
  • 2 replies
  • 1521 views

How can i ensure the ACDL persists or updates correctly across page loads when using WebSDK, as it refreshes on each new page load(triggered by button clicks to the next page)?The ACDL code is currently implemented through Launch, and we'd like to maintain this setup.

Also, we tried using session storage to capture the data first then send it to ACDL but in that case too we are missing the server calls sometimes.

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

2 replies

FarazHusain
Adobe Employee
Adobe Employee
November 8, 2024

As far as I know, there is no persistence across pages in the case of ACDL, as it only lives on the page and gets refreshed on each page load. Session storage is a good idea for capturing and pushing the data back in ACDL, but make sure that the rule/code fires and pushes data to ACDL works on every page. Possibly use browser default events to push the data. 

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 9, 2024

@muskaan_22 worth asking why you would want the ACDL to persist in the first place? Since the ACDL should be set and filled with the relevant data on every single page by the underlying page, and the content will differ mostly what exactly is the type of day that you want to persist.

 

if you really need to persist data across page loads, then store inside of a storage or local storage.

but the data layer is really just there to provide some kind of abstraction of the underlying page that can be picked up easily by the tag management system. 

and in my opinion, it also does not make a difference if you're providing some kind of automatic click tracking rules inside of your Adobe launch since this will anyway only capture what is likely provided in the button you added to click event to. as I understand it, you are talking about underlying page data correct?

the website should take care of providing this kind of information and this should be done on every single page. This is a developer task.

Cheers from Switzerland!
Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 9, 2024

@bjoern__koth (welcome back, it's been a few days since I've seen you!), I think the issue is that their clicks / actions have a timing issue... that the values being populated into the ACDL are being lost before they can be processed to track the click action (as opposed to needing to carry forward the previous page's data)

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 8, 2024

Honestly, this is one of the reasons why I don't like Event Based Data Layers... the number of steps involved that can lead to lost tracking...

 

Example: User Clicks a button

  • Rule detecting the click, to put data in to the Data Layer is triggered
  • Data is added to the Data Layer
  • Rule to detect the Data Layer Change is triggered
  • Tracking based on the Data Layer event is fired

 

Instead of just listening for the click event and firing the analytics on that one step.... While there is still a possibility to lose tracking due to timing, the risk is a lot less....

 

Since you are triggering all the steps, have you tried just a simple rule to detect the button click and send the tracking as part of that rule... rather than pushing to the Data Layer?

 

 

Unfortunately, as @farazhusain said, there is no way to force this... as the Data Layer being deleted upon changing pages is a fundamental behaviour of websites, and nothing to do with Adobe...

 

The only way to "persist" a Data Layer is when the website is coded as a Single Page Application (meaning there is no purge of objects between actions)... but this comes with its own set of challenges.. like some data being incorrectly maintained where it shouldn't... and for long sessions, the Data Layer will continue to grow and can cause performance issues trying to maintain so much data, so you often have to build in your own purge to keep things running smoothly.... 

Jagpreet_Singh_
Community Manager
Community Manager
November 18, 2024

@muskaan_22  Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

November 21, 2024

@jagpreet_singh_ unfortunately we haven't found a solution yet , we are still trying a few more things to resolve this issue , i'll update here if i find a solution, meanwhile if there is anything else that you know that i can try, i would be happy to.

 

One sure shot way to resolve this issue is to send all the ACDL updates via code but that is a route if wanna take only if we have exhausted every other way and nothing else is working