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.
Solved! Go to Solution.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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).
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
@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:
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:
Any suggestions on that?
Views
Replies
Total Likes
@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
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.
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
Views
Replies
Total Likes
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
@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
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies