AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

1.8K members online now
1.8K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

GTM container loading error : DL event 'gtm.dom' & 'gtm.load' not being pushed

Follower ✭ ✭ ✭
# 1
Follower ✭ ✭ ✭

Hey guys,


I think I reached limits on my JS skills in order to debug with-in GTM library code Smiley Wink. Can anyone pls. tell me what’s the implication of this piece of code right after GTM container tag. Attach screenshot of GTM debug screen, as you can see GTM container loading gets stuck mid-way (something to do with null value being pushed to DL?)

var t = null;
try {
console.log("pushed dataLayer pairs2")
catch (x) {


fyi, I notice things go awry only when variable ’t’ is null. For non-null values (var t=123, for example), things work like a charm: GTM container loads perfectly - gtm.js > gtm.dom > gtm.load events - and subsequent dataLayer.push() statements work normally)

NOTE: You can use this link (>> click link to demo) in order to open GTM container in debug mode at your end:


Thanks a lot for your insights on this.





Re: GTM container loading error : DL event 'gtm.dom' &amp; 'gtm.load' not being pushed

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

@Vibhor J


I hope you are doing well !


As per my observation you are passing null as a string into dataLayer without Single/double quote. Please pass the same in quotes. 


Please refer the screenshot for your reference.


GTM container loading error : DL event 'gtm.dom' &amp;amp; 'gtm.load' not being pushed

Follower ✭ ✭ ✭
# 3
Follower ✭ ✭ ✭

Thanks Wasim for taking your time.

True, we're not passing an object as Key / Value pair into DL. How come I could pass dataLayer.push("123") or dataLayer.push(123) and things work perfectly then


I think I can pass any object to dataLayer.push(), at the end dataLayer is an Array of objects, but I notice, only when I pass null value, things start to break. This doesn't happen with any non-null value,  be it key / value pair or object in itself.