Google Tag Manager Errors

Thảo luận trong 'Google Analytics' bắt đầu bởi KetHuynh, 4/3/17.

  1. KetHuynh

    KetHuynh Administrator Thành viên BQT

    Tag is included in an iframe
    The Google Tag Manager snippet must be placed directly in the page that you intend on tracking. Placing it in a hidden iframe or deploying it within another tag management system will prevent certain tags from accurately tracking the parent page.

    This will prevent certain tags from accurately tracking the parent page because of which tags added via Tag Manager may not fire accurately.

    The Google Tag Manager snippet must be placed directly in the page, immediately after the opening <body>tag, that you intend on tracking
     
  2. KetHuynh

    KetHuynh Administrator Thành viên BQT

    Non-standard implementation
    We have detected Google Tag Manager web requests, but were not able to find the code snippet on the page.

    Using non-standard code implementation on a page may prevent tags from being fired.

    Verify that your code snippet is working fine. You can make use of the preview and debug tool to ensure all tags added in Google Tag manager are being fired: https://support.google.com/tagmanager/answer/2695660
     
  3. KetHuynh

    KetHuynh Administrator Thành viên BQT

    Multiple installations of Google Tag Manager detected
    We suggest you place only 1 instance of the Tag Manager snippet on a webpage. Multiple Tag Manager snippets Don't work well with each other

    Multiple Tag Manager snippets Don't work well with each other because of which the tag added via Tag Manager may not always fire correctly.

    Place only 1 instance of the Tag Manager snippet on a webpage.
     
  4. KetHuynh

    KetHuynh Administrator Thành viên BQT

    Invalid or missing account ID
    NOTE: If your container ID (i.e. what’s referenced here as ‘account ID’) is of format GTM-XXXXXXX, where the portion after ‘GTM-’ is longer than 6 characters, you may see this error unnecessarily. This false error will be resolved in a future update. In the meantime, as long as your container ID follows the correct format as described below, you may ignore this error.
    The account ID added in the Tag Manager snippet is wrong. An example snippet will look something like this:

    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    newDate().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-XXXXX');</script>
    <!-- End Google Tag Manager -->

    The "GTM-XXXXX" should be replaced by your account ID. The best way to fix this is to re-install the entire container snippet using the latest guidance. You can find your account-specific snippet in your Tag Manager account:

    1. Log in to your Tag Manager account at https://tagmanager.google.com.
    2. Near the top of your workspace's home screen, you will see your Google Tag Manager container ID number (formatted as "GTM-XXXXX"). Click it to launch the Install Tag Manager box.
    3. Copy and paste the code snippets into your website as instructed. The <script> portion of the JavaScript snippet will be placed in the <head> of your web page's HTML output, and the <noscript> section should appear immediately after the opening <body> element. For best results, the <script> portion of the snippet should be placed as close to the opening <head> element as possible, but below any dataLayer declarations. See the Tag Manager developer site for further installation details.
     
  5. KetHuynh

    KetHuynh Administrator Thành viên BQT

    Data layer fields should be quoted
    While quotes are not strictly required for variable names that consist of only letters, numbers, and underscores, and which are not reserved words (e.g. function, export, native, etc.), to avoid issues, it"s recommended that all variable names be enclosed in quotes. Examples: dataLayer.push({new-variable: "value"}); // Won"t work dataLayer.push({"new-variable": "value"}); // Better
     
  6. KetHuynh

    KetHuynh Administrator Thành viên BQT

    Consolidate your tags with Google Tag Manager.
    Google Tag Manager allows you to conveniently manage tags (such as tracking and marketing optimization tags) on your site. You can add and update AdWords, Google Analytics, Floodlight, and non-Google tags from the Google Tag Manager user interface instead of editing site code. This reduces errors, frees you from having to involve a webmaster, and allows you to quickly deploy tags on your site.

    To manage your tags using Google Tag Manager, you’ll need to: go to google.com/tagmanager to create a Google Tag Manager account (or to access an existing account). create a container for your site in the account, add the container snippet to your site, while removing any existing tags on your site. You’ll then be ready to add tags to your site via the Google Tag Manager user interface. For more information, read Setup and Workflow.
     
  7. KetHuynh

    KetHuynh Administrator Thành viên BQT

    Code found outside of <body> tag
    NOTE: Please ignore this error. The recommendations for how to implement the Google Tag Manager container code have changed. While implementations with the container code entirely in the <body> will continue to work as is, it’s now recommended that the container code be split, with the <script> portion in the <head> and the <noscript> portion in the <body>. Further context may be found in this blog post. This false error will be resolved in a future update. In the meantime, you may ignore this error.
     
  8. KetHuynh

    KetHuynh Administrator Thành viên BQT

    <script> tag must not be included in a <td>
    Google Tag Manager Tag should be placed immediately after the opening <body> tag and not inside any other HTML element. The Google Tag Manager snippet must be placed directly in the page that you intend on tracking. Placing it in a hidden iframe or deploying it within another tag management system will prevent certain tags from accurately tracking the parent page.

    Tags added via Google Tag Manager may not fire.

    Please make sure to place the Tag Manager snippet immediately after the opening <body> tag.
     
  9. KetHuynh

    KetHuynh Administrator Thành viên BQT

    <script> tag must not be included in a <div>
    Google Tag Manager Tag should be placed immediately after the opening <body> tag and not inside any other HTML element. The Google Tag Manager snippet must be placed directly in the page that you intend on tracking. Placing it in a hidden iframe or deploying it within another tag management system will prevent certain tags from accurately tracking the parent page.

    Tags added via Google Tag Manager may not fire.

    Please make sure to place the Tag Manager snippet immediately after the opening <body> tag.
     

Chia sẻ trang này