The Google Analytics tracking code on your site looks malformed.

Home Forums Web Hosting Forum The Google Analytics tracking code on your site looks malformed.

This topic contains 1 reply, has 2 voices, and was last updated by  Keith Taylor 4 years ago.

  • Author
    Posts
  • #2576

    Anna
    Participant
    Ŧollars: Ŧ 42.25



    I’m getting the Google Search Console message:

    The Google Analytics tracking code on your site looks malformed.

    This happened since I switched to Tag Manager to insert my Google Analytics snippets. Is there a way round this, or should I use a different verification method? I use CloudFlare for better speed and security, so I could easily use there verification tool, but I’m just wondering if which is the best verification method for Google Search Console.

  • #2577

    Keith Taylor
    Keymaster
    Ŧollars: Ŧ 1 ,190.26

    First, there’s no ‘best’ verification method for Google Search Console. It’s just a matter of using whatever suits your circumstances.

    For ordinary websites, it’s most appropriate to simply use Googles recommended method of linking to Google Analytics. But it isn’t wrong to use other methods if they’re easier.

    This is specially true if you use CloudFlare, because I think the CloudFlare App for verifying site ownership is easiest. The only time it would be inappropriate is if you planned to stop using CloudFlare, but I cannot see why you would.

    There is now an option for Google Tag Manager in the ‘Alternate Methods’ list for Search Console Site Verification. However, this is not compatible with CloudFlare in most cases because CloudFlare inserts it’s own code immediately after the <BODY> HTML tag. Therefore, the CloudFlare App is your most appropriate site verification method.

    Confusingly, the CloudFlare App still has Google Webmaster Tools title, but that is the one you want. You must complete all the following steps for it to work correctly:

    1. Select Apps in CloudFlare, and scroll down to, or search for, Google Webmaster Tools.
    2. Click Setup to reveal the Authorization explanation.
    3. Click Start. If you have different Google logins available be sure to select the one you use for Search Console.
    4. Click the link in the CloudFlare prompt: “You must verify this site at Google.” Note that CloudFlare will add your domain details to the link, so you should see a simple form headed: Verification Method: Domain name provider
    5. Scroll to the bottom of the domain providers list, and select Other.
    6. Copy the boxed TXT record details that starts: google-site-verification=
    7. Return to CloudFlare and select the DNS page, where you will see that there is a blank google-site-verification TXT record. Edit that with the full key copied in the previous step.
    8. Return to Google’s site verification page, and click the Verify button.

    I provide Google Site Verification with all my packages. I’m also in the process of adding this as a service in my new price list. Until I complete that list, I’m happy to provide Shrewdies Site Verification free of charge. Just let me know you domain details here, or click the orange Internet Support button. You can also raise a ticket in my Internet Support Helpdesk.

You must be logged in to reply to this topic.