Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Google Tag Manager events not tracking from AEM as Cloud

Avatar

Community Advisor

Hi All

 

Recently, there was a sudden issue in our production where GTM was not receiving events from our website. We were unsure why this issue was happening as there were no major changes made that could have affected it. During our analysis, we realized that there was a conflict between GTM and the Adobe Datalayer, which had not occurred before. Additionally, we observed the following warning messages in the console.

VeenaVikraman_0-1715857033710.png

 

 

Root Cause :-

There has been a core component v3 page component update happened for improving datalayer and that introduced this issue  aem-core-wcm-components: //github SITES-21233 - Improve datalayer initialization (#2724) * Accounts ...

A ticket was raised Tracking events intended for GTM datalayer are being interceptedDONE and seems like it is now fixed and will be updated with the future core component updates https://github.com/adobe/aem-core-wcm-components/commit/9a1f683f129df45c188078d8741c03e1ce74f12f

 

Incase any of your project is suddenly facing this issue , hope this answers . 

 

FYI @kautuk_sahni 

Topics

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

5 Replies

Avatar

Community Advisor

Thanks @VeenaVikraman 

 

I saw this issue reported in the Analytics community. Maybe we should move this thread there after it gains some visibility here?



Esteban Bustamante

Avatar

Level 2

Hello @EstebanBustamante  - could you please share a link to the discussion in the Analytics community? I couldn't find it.

 

I've got a similar issue. On May 21st all custom events (and custom parameters) stopped being collected. Unfortunately the tech support team couldn't help with resolving this issue because we use GTM to deploy AA tracking code.

 

 

Avatar

Community Advisor

I think your issue is different, here is the analytics community link so you can post your issue there: https://experienceleaguecommunities.adobe.com/t5/adobe-analytics/ct-p/adobe-analytics-community



Esteban Bustamante

Avatar

Community Advisor

We just got out of this challenging problem as well. Jumped into a call with Adobe, and pinpointed the problem. The problem here is that the latest AEM Core Components introduced this bug.

BrianKasingli_0-1716005751130.png

 

Let's take a look at what I am pointing to here, so what was removed was the ability to have customers set window['adobeDataLayer'] or any other variable to capture AEM Core Component's dataLayer object... This is a configuration in the Context Aware Data Layer Configs. However, the latest code have introduced a bug where now where dataLayer is always going to be set for the AEM Core Component's dataLayer.

That being said, Google Tag Manager relies on window.dataLayer, and so since Adobe's introduction of the bug... if you are using Adobe Launch (or now known as AEP Data-Collection) to inject Google Scripts on the page, the /apps/core/wcm/components/page/v3/page/page.html will override the Adobe Launch's collection object (window.dataLayer). As an interim solution we have re-configured the GA configuration on Adobe Launch to from depending on window.dataLayer to window.googleDataLayer, and it all works.... but however if you do this, you must beware of custom code in your codebase that uses window.dataLayer... which this object was meant for GA itself.

If Adobe Launch updates is not an option, you can simply overlay the page.html, and reverse the changes you see here.

BrianKasingli_1-1716006049419.png



Adobe has confirmed to me that in 2 weeks a new version of the AEMaaCS platform will be rolled out, and this problem will be resolved. 



Avatar

Level 2
Hello Brian, many thanks for sharing this. Do you happen to know if the issue was resolved with the recent releases? I've checked the most resent one on June 7, however I couldn't find any info related to it  https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/release-notes/re...
 
We're having a similar issue, however we don't use AEM sites. We use GTM to deploy the AA tracking script and to tag event tracking. We still see pageview events in AA, however all custom events ('event'), along with their custom parameters (prop, eVar), have stopped being collected.
It seems like this issue is also affecting non AEMaaCS users.