• GoDaddy Community
  • GoCentral | Website Builder
  • GoCentral | Website Builder

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    Go to solution

    Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    I am trying to add the Google Tag Manager install code to my website via the GoDaddy Website Builder 6.

     

    However, when I try to add the Google Tag Manager code, I get the error message: “Please enter a valid javascript code snippet.”.

     

    Here are the steps I take:

     

    In Google Tag Manager:
    * copy the code to add the <head>

     

    In GoDaddy Website Builder:
    * click the Pages menu link
    * click Page Properties icon
    * click the Javascript tab in Page Properties
    * add the copied Google Tag Manager <head> script code to the "Javascript for <head> section"

     

    Back to Google Tag Manager:
    * copy the code to add the <body>

     

    In GoDaddy Website Builder:
    * copy this code under the "JavaScript placed before </body> section"
    * click apply

     

    I then see the error, “Please enter a valid javascript code snippet.”

     

    I don’t understand, though, how the Google Tag Manager code I copy directly from the Google Tag Manager area is invalid?

     

    Thanks!

    11 REPLIES 11

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    Anybody know the answer to this? Not being able to add Google Tag Manager to GoDaddy Website Builder is a bit of a show stopper.

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    I did find an article that states that "you can place both of the Google Tag Manager codes in <body> only" - see https://www.analyticsmania.com/post/how-to-install-google-tag-manager/.

     

    And, when you add the Google Tag Manager code to the popular/script area, you do NOT get an error. Then, you can drag the script area to the FIRST drop zone.

     

    It's not really the best, since the code is not just after the <body> tag, but maybe it will work?

     

    Be sure to preview the page first. I did see one page where my content was NOT displayed due to adding this script code. Once I took the script code out, all was fine though.

     

    You will need to go through each and every page to do this - I can't see where you can add code to "all" the pages.

     

    Does anyone have any better solution?

     

    UPDATE: although I could add the GTM tracking code to the <body> using popular/scripts (with no javascript errors), this method does not work.

     

    When I checked the code with the Chrome tag assistant, I got the following errors:

     

    * <script> tag must not be included in a <div>
    * GTM JavaScript code not found as a direct child of the <head> tag

    Helper V
    Helper V

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    @godadabc,

     

    The Conversion Tracking code will only go into a conversion page...

    https://support.google.com/adwords/answer/6331314

    I think inserting Conversion Tracking code on all pages is not required...

     

    Hope this helps

     

    Regards,

     

    Praveen Thomas

    GoDaddy 24/7 Support www.x.co/247support
    ----->NEXIA

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    Thanks for responding!

     

    Yes, the AdWords conversion code only goes on conversion pages. However, for forms, I don't have a conversion page, as there is no "thank you" page after someone clicks submit on a form. And, I don't believe that I can add a "thank you" page to forms with GoDaddy - please let me know if I am wrong since page tracking would be easier if I had a conversion page.

     

     

    So, because there are no conversion pages for forms, I am using Google Tag Manager instead. See https://www.en.advertisercommunity.com/t5/AdWords-Tracking-and-Reporting/How-to-track-a-conversion-w... for an explanation.

     

    And, in order to use Google Tag Manager, I must add the Google Tag Manager tracking code to "every page of your website" (see https://developers.google.com/tag-manager/quickstart), which is going to be a pain: I can't use the pages/page properties method, since it doesn't work, so I need to use the popular/script method to add/drag this code to my page.

     

    Thanks!

     

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    By the way, as one last test (to make sure I didn't copy/paste bad GTM code before):

     

    I took the Google Tag Manager <head> code I found at https://developers.google.com/tag-manager/quickstart (see below), replaced the "xxxx" with "4567", and added the code to the javascript area at pages/properties, and I still get the "Please enter a valid javascript code snippet" error code. 

     

    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    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=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-4567');</script>

     

    Thanks!

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    And - I was just trying to add the AdWords call conversion script (which is NOT from Google Tag Manager) to Go Daddy via page/page properties/javascript, and I am getting the same error when I try to add the code: "Please enter a valid javascript code snippet".

     

    This IS valid code. I don't know where to go now.

     

    Here is a sample of the code:

    <script>
      gtag('config', 'AW-CONVERSION_ID/CONVERSION_LABEL', {
        'phone_conversion_number': '1-650-555-5555'
      });
    </script>

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    I talked to Go Daddy and, bottom line, you can't add either the AdWords tracking code OR the Google Tag Manager code. 

     

    So, I guess there is nothing else that can be done.

     

     

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    I am running into this same issue, especially with call forwarding. It's a big enough issue to make me think about moving about 5 of my client's sites to some other system. Thanks for posting this. Helped me understand that I'm not missing a solution.

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    I was able to successfully add a GTM code.

     

    Go into edit the website in GoDaddy, in the top right click the hamburger menu, and click on Site Settings, then navigate to the "Stie-wide Code" section, and add it in the head tag. Then hit save and publish, for some reason when i published the first time it gave me an error, i just hit ok and published again and it worked.

     

    2018-06-29_10-47-50.png

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    Thank you so much for your reply.

     

    Unfortunately, this issue is about GoDaddy Website Builder 6, and your answer relates to a version beyond Website Builder 6.

     

    So, therefore, this is NOT a solution to this issue.

     

    But, it is a useful answer to those who do have new versions of Website Builder.

     

    Thanks again!

    Solution

    Re: Can’t add Google Tag Manager install code to GoDaddy Website Builder 6

    Today I was able to successfully add the Google Tag Manager code to all my pages. For each page, I:

     

    * clicked the “Popular” link

    * dragged the Script icon to the last “drop area” in the bottom of the page

    * erased the example script in the script widget that opened and added the Google Tag Manager code

    * published my changes once all pages were updated

     

    This added the code to Body (NOT Head, as recommended by Google). However, when I checked the tags with Chrome’s tag assistant, it said all was okay.

     

    As I stated, above, this didn't work before. But, maybe adding the code to the bottom of the page helped????

     

    So - it looks like this is the workaround for adding Google Tag Manager code to a website built with GoDaddy Website Builder 6.