Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Not able to pull the page name from dataLayer object. Help needed.

Avatar

Level 4

I'm using AEM 6.5.7.

As part of Launch Implementation, a dataLayer object is created and we have pushed the data as below. For Page name, i could retrieve using window.dataLayer.page[0].eventInfo.pagename in the browser console as below;

 

Please find the below screenshot for the complete dataLayer used and the values pushed from the browser console;

 

Now, In Adobe Launch, I have configured as below in after creating a data element with "Page Name"

 

In the Adobe Analytics section, please find the below modifications,

In the Rules, I have added as below;

Now, when I try to check from Network Tab / using Observe point plugin although an analytics call is triggered. I could not see the page name.

 

Please find the below screenshot from the AEM page where there should be a Page name similar to Page url which is not available.

 

I have researched on this issue for a long time now.

Please help me out.

 

Thanks in advance !

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@samsundar23,

You might want to validate and upgrade your data layer Javascript block, which should be serverside rendered on your basepage.html.

 

Maybe you need to hide your organisation's website from your screenshots, for privacy reasons, but from looking at your organisation's website, you have something w/ datalayers going on here. The data layer here looks like it is being generated by sightly or JSP view logic, located at the bottom of the page. 

You might be missing this information is because some of your page templates (resourceType) has the missing layer HTML block, but from the code I copied from your organisation's website, it looks like the eventinfo.title is there.

 

 

 

<!-- The datalayer object starts -->
<script language="JavaScript" type="text/javascript">
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'content_landing',
eventInfo: {
    title: 'Home loans - calculators, guides and compare - N/A Bank',
    url: window.location.href.replace(location.search, ''),
    description:'With a wide range of flexible home loans, calculators and guides, we can help you get the most out of your home loan.'
  }
});
</script>

 

 

 

;  

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@samsundar23,

You might want to validate and upgrade your data layer Javascript block, which should be serverside rendered on your basepage.html.

 

Maybe you need to hide your organisation's website from your screenshots, for privacy reasons, but from looking at your organisation's website, you have something w/ datalayers going on here. The data layer here looks like it is being generated by sightly or JSP view logic, located at the bottom of the page. 

You might be missing this information is because some of your page templates (resourceType) has the missing layer HTML block, but from the code I copied from your organisation's website, it looks like the eventinfo.title is there.

 

 

 

<!-- The datalayer object starts -->
<script language="JavaScript" type="text/javascript">
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'content_landing',
eventInfo: {
    title: 'Home loans - calculators, guides and compare - N/A Bank',
    url: window.location.href.replace(location.search, ''),
    description:'With a wide range of flexible home loans, calculators and guides, we can help you get the most out of your home loan.'
  }
});
</script>

 

 

 

;  

Avatar

Community Advisor

Hi @samsundar23 ,

 

Just try 'Core-Page Bottom' event type on your rule. Also, try to optimize your data layer since I had seen sometime issue while picking data using SOMETHING[0].ABC. Can you pick page name may be from document title which you can easily set in your base template.

 

Please check below video if it helps-

https://www.youtube.com/watch?v=0IKSoIgJXK8&list=PLzwWOJSdKWBeBfceV2chFhpIxFdRYOt-C&index=14