I am collecting page names in prop1 and page URLs in prop2. In the analysis workspace, when I break down the page name dimension for any particular page it also shows me URLs of other pages.
I would have understood if this had been an eVar set to expire on a visit, but why is it happening with props? I checked on every page view server call correct/intended page name and page URLs are being sent.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
interesting one. Since props are only valid for one Hit and do not persist like eVars, how do you retrieve the values for prop1/2?
Through Data Elements? If so, what persistence have you set on them?
When you look at the individual URLs, do you see the correct prop1+2 combination?
What if you go to the next page? Still correct prop1+2?
Maybe some screenshots of your setup would help. You can also drop me a DM if you are allowed to shared the URLs (if they are on prod already)
Views
Replies
Total Likes
Storage duration is chosen as 'None' while defining data element. Could this be the cause of the issue? Shall I change it to 'page view'?
When I look at the individual URLs I see correct prop1+2 combination and on next pages as well.
Views
Replies
Total Likes
"None" should be the best (it means that the values are grabbed on each use, as opposed to being remembered in the implementation).
How are you setting your "Page Name" in prop1? Are you pulling this from the page's Doc Title? Are you pulling it from a Data Layer?
Is your site a traditional paged version, or is it a SPA (single page application)?
If an SPA, is it possible the tracking is happening before the "page" content is updated by your developers, so you are actually picking up previous page data (either the URL OR the Page Name)... since both of those are being updated with JavaScript?
Like @bjoern__koth if you are open to sharing more information directly, I would be happy to help as well.
It is SPA, and both the page name and page url values are being pulled through data layer, and these values are populating correctly in the data layer on every page load.
The portal is angular-based, and we are triggering the 'pageInitialization' data layer which has page name and page URL variables on every page/content load with the 'ngAfterViewInit' lifecycle hook.
Views
Replies
Total Likes
This might indicate a timing issue where potentially the page view is fired too early or too late and either URL or page name hasn't yet updated. Maybe worthwhile asking your devs to put a small delay in before sending the tracking call.
SPAs are sometimes special
Yeah, it definitely sounds like a timing issue @bjoern__koth
Views
Replies
Total Likes
When you say "both the page name and page url values are being pulled through data layer, and these values are populating correctly in the data layer on every page load"... do you mean when you check the data later after the page is loaded...
Your tracking is likely pulling the values a lot sooner than you are checking... meaning the value may not yet be updated, which is leading to issues.
What trigger are you using for your rule? If you are using "History Change" that might be done before the data layer is updated (due to different latencies, this might mean it works some of the time, but not other times, since the data layer is in the process of being updated)..... for a lot of SPA sites, it can be a lot safer to have your developers create custom triggers (either calling the Launch Rules via "Direct Call", or to trigger a custom JS event that you listen for with a Custom Code rule...). These triggers allow the developers to ensure that ALL the data is ready before the tracking runs.
Views
Replies
Total Likes
@firefighteradi How are your page views triggered? Through an event from the SPA or a history change?
Instead of asking your devs as suggested above, you can also try to add a delay through a custom code action as described here:
basically add an action that is removing a Promise after a given amount of time. Important is that your Launch property runs rules and actions in sequence (in the property settings, it's the default)
Views
Replies
Total Likes
Hi @firefighteradi
I just saw your attached screenshot you could validate on below scenarios to get it fixed.
1. Its looks like your data layer for page url might be sending referrer or previous page url.
Check the data layer value by accessing the site.
2. Can you confirm the page name My cart page is capture when user land to cart page or is it a section in my account page?
Views
Replies
Total Likes