Answered

dataLayer events not showing up inside Google Tag Manager

  • 5 October 2022
  • 2 replies
  • 1384 views

Hi, we are using native typeform integration, but it seems like the integration blocks the communication between the dataLayer object and Google TagManager.

GTM cant see any events dispatched.

When debugging GTM, all GTM events happen normally, but every time we need to use dataLayer, GTM cant see it.


Thats the url: 
https://sofia-salud.typeform.com/to/Wmm83bDg/

When we run this js command in the console

dataLayer.push({'event': 'formSent', 'testData':'testData'});

We should see the event inside GTM debugger, but nothing happens.

 

icon

Best answer by Neoperformance 5 October 2022, 23:32

View original

2 replies

Ok, I solved my problem.

Typeform inserts GTM naming the datalayer differently.

They call it “googleTagManager”

If you run the script

dataLayer = googleTagManager;

all of your dataLayer scripts will start working.

Userlevel 7
Badge +5

Yay, @Neoperformance! Happy you solved your issue on your own, well done!

I've just checked your form and I notice that you don't use our legal question option and that could be cool for you! So your respondents will have to accept it in accordance with your data privacy policy. Just a thought, of course! You can check all of the types of questions we have on this article.

Have a nice day! 😉

Reply