• I’m using Google Tag Manager for WordPress plugin and it puts this in the header

    dataLayer.push({“pagePostType”:”page”,”pagePostType2″:”single-page”,”browserName”:”etc

    which fails I guess as the GTM script has been aggregated and not run yet?

    What’s the correct way to deal with this?

Viewing 1 replies (of 1 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, normally the GTM-script is hosted on Google’s servers, so AO does not aggregate & defer that? if you have the file locally somehow, you’ll need to exclude it from being optimized?

    hope this helps,
    frank

Viewing 1 replies (of 1 total)

The topic ‘dataLayer is not defined’ is closed to new replies.