Support » Plugin: Head Cleaner » Syntax error in Google Tag Manager script

  • Head Cleaner converts quotes in Google Tag Manager script and it causes syntax error. Here is the optimized code by Head Cleaner. See line 3, after gtm.js?id=.

    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '"+i+dl;f.parentNode.insertBefore(j,f);

    You can see the original JavaScript at

    And I’m using TwentySixteen theme and head cleaner with default settings. Only “Add canonical tag.” is enabled. How can I solve this issue?

  • The topic ‘Syntax error in Google Tag Manager script’ is closed to new replies.