Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Data Element not populating values for evar correctly

jsvasu
Level 3
Level 3

I have webpages as Single page application (SPA) without refresh. I am getting adobe hit for every URL change with the help of History Change event type. Now I am trying to capture some of the data layer objects on every URL change. For this I created seprate data elements and mapped them to evars & enabled a DOM ready event type rule in launch however, I am unable to get anything in the debugger (looks like DOM reday is not right event type). Any suggestions on this?

 

I also tried changing it to history change but I am facing timing issue. The values of data elements are populating later on, which means data elements of page A are populating when page B or C are clicked. Screen Shot 2021-08-02 at 10.04.19 PM.png

1 Accepted Solution
PratheepArunRaj
Correct answer by
Moderator
Moderator

Dear Vasu,

We can deal this in two ways.

1. Direct Call: Use Direct Call along with Parameters (We can add it in Launch) to trigger the Page Views thereby grabbing the values from Parameters.

2. Use Data Element Trigger : Event trigger based on Data Element Change. When data element changes we can trigger it grabbing the Data Layer.

First method is best but need to trigger the function call at the page level and thus time consuming. Second method is easy but not sure whether it is completely consistent, but I have used it for only of my project and it is fine. This didn't require page editions and thus not time consuming.

Thank You, Pratheep Arun Raj B | Xerago | Terryn Winter Analytics

View solution in original post

7 Replies
yuhuisg
Community Advisor
Community Advisor

Firstly, there is a forum for Adobe Launch at https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/qa-p/experience-pl... so you can post your Launch-specific questions there.

I think the best solution for you is to ask your developers to use a _satellite.track() Direct Call (or CustomEvent, if you're familiar with that, which works the same way as a Direct Call but is an actual web standard) when all of the required variables have been set there after each history URL change. Then, you can fire your Rule with that Direct Call (or CustomEvent).

PratheepArunRaj
Correct answer by
Moderator
Moderator

Dear Vasu,

We can deal this in two ways.

1. Direct Call: Use Direct Call along with Parameters (We can add it in Launch) to trigger the Page Views thereby grabbing the values from Parameters.

2. Use Data Element Trigger : Event trigger based on Data Element Change. When data element changes we can trigger it grabbing the Data Layer.

First method is best but need to trigger the function call at the page level and thus time consuming. Second method is easy but not sure whether it is completely consistent, but I have used it for only of my project and it is fine. This didn't require page editions and thus not time consuming.

Thank You, Pratheep Arun Raj B | Xerago | Terryn Winter Analytics

View solution in original post

jsvasu
Level 3
Level 3

@PratheepArunRaj I have implemented Direct call rule but the hits are happening twice ie. one via history change rule which is pushing page URL update from browser via custom code shown below:

jsvasu_0-1628794304677.png

And one hit is happening via Direct call rule. 

 

Moreover, in my data layer, data object "contentType" is existing only for specific detail pages like Articles, Forums, blogs etc, not for whole site. And, if I visit any of the detail pages the content type do get updates but it stays/persist for further navigations untill the content type doesn't change which is wrong. reference below:

jsvasu_3-1628796568786.png

 

Any suggestions on that?

 

jsvasu
Level 3
Level 3

@PratheepArunRaj on SPA website I have actually made adobe hit to happen via history change rule where I custom code to update the page url like below

jsvasu_4-1628256614954.png

 

jsvasu_1-1628255061841.png

 

And, as suggested by you I tried using Data Element change configuration as below. I have my Data Element "page title" configured which I am pulling here in the rule event type & getting the evars to triggered.  

jsvasu_2-1628256388419.png

 

jsvasu_0-1628254965152.png

jsvasu_0-1628257447497.png

I have changed the time here from 2000ms to 4500 ms so that event get time to pop the evars value. Is this is fine? 

 

However, the evars values are not coming up instantly for its corresponding page. Its coming up for next page hit. like below 

jsvasu_6-1628257265984.png

 

PratheepArunRaj
Moderator
Moderator

Dear Vasu,

If possible, can we connect aound next week to debug?

If eVars are updated during the Page Title change, you should not see the old values.

Thank You, Pratheep Arun Raj B | Xerago | Terryn Winter Analytics

jsvasu
Level 3
Level 3

@PratheepArunRaj i tried setting the storage of the Data Element to None then it worked for me correctly. It was may be due to because of the nature of the website. Thank you so much for your suggestion on Direct Call. This actually worked better than history change. We are now able to trigger the adobe hit also through "Direct Call". thanks