Not able to pull the page name from dataLayer object. Help needed. | Adobe Higher Education
Skip to main content
samsundar23
Level 4
June 16, 2021
解決済み

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

  • June 16, 2021
  • 2 の返信
  • 1946 ビュー

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 !

このトピックへの返信は締め切られました。
ベストアンサー BrianKasingli

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

 

 

 

;  

2 の返信

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 16, 2021

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

 

 

 

;  

Ritesh_Mittal
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 16, 2021

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