Expand my Community achievements bar.

Ensuring ACDL persistence across pageloads with Web SDK using Adobe Launch

Avatar

Level 1

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.

9 Replies

Avatar

Employee Advisor

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. 

Avatar

Community Advisor

@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!


Avatar

Community Advisor and Adobe Champion

@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)

Avatar

Community Advisor

Let's say I was in a baby bubble

 

@muskaan_22 but do you see aborted requests or just missing data? In the case of missing data, this could also be a timing issue on your development side of the website. I haven't heard of any ACDL delays that lead to missing data 

 

In case of aborted requests, maybe Web SdK event grouping could work since it will persist the click data in a localStorage object until the next page view.

 

And how is that request being triggered? Is there an ACDL rule being called from your website or do you attach some kind of click handler?

 

https://experienceleague.adobe.com/en/docs/experience-platform/tags/extensions/client/web-sdk/web-sd...

 

Cheers from Switzerland!


Avatar

Level 1

@bjoern__koth  we are triggering a direct call to the next rule(to update ACDL) upon capturing the data in session storage for ACDL to pickup the data from session storage but there is  time gap between the direct call triggering the next rule and the new page loading and ACDL being initialized  because of which the 2nd rule which was triggered is being aborted as it didn't not find ACDL to update data too because of which sometime we are missing the calls .

 

Actually, ACDL persisting is not our main concern , we wanted to understand if there is an alternative way to keep all the code that sends data to ACDL in tag manager and not miss these server calls.

Avatar

Community Advisor

Hi @muskaan_22 

if you don't mind, would you share the URL with me in a DM, so I can have a look at it? I have really not experienced any delays so far.

When you say "upon capturing data in the session storage", are you regularly checking for this value to be set or are you triggering the DC directly after setting it (next line of code)?

Cheers from Switzerland!


Avatar

Community Advisor and Adobe Champion

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.... 

Avatar

Administrator

@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!

Avatar

Level 1

@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