Google Analytics Better Tracks AMP Pages With AMP Client ID API

Sep 6, 2017 - 8:15 am 1 by
Filed Under Web Analytics

Google Analytics Amp

Since many of the complaints last year around how AMP and Google Analytics don't really work well together, Google has been working on improving the accuracy of how Google Analytics tracks sites with AMP pages.

Google announced a new solution that will do just that but it requires a "small code change" on both your AMP and non-AMP pages.

If you make this change, Google said you can expect that your user and session metrics will drop down to more accurate counts as formerly distinct users are recognized as the same person, as well as related metrics that will also become more accurate (such as Time on Site and Bounce Rate). And New Users may rise temporarily, Google added.

Here is what you need to change:

Opt in on your AMP pages

Include the following code in the <head> of your AMP page:

<meta name="amp-google-client-id-api" content="googleanalytics">

Opt in on your non-AMP pages

Google Tag Manager

The following steps should be completed on your existing published tag container(s).

  1. Navigate to Tag Configuration > Fields to Set.
  2. Set useAmpClientId to true.
  3. Save the new tag configuration.
  4. Submit the tag.
  5. Publish the container.

analytics.js

Include the following in your Analytics tracking code:

ga('create', 'UA-XXXXX-Y', 'auto', {'useAmpClientId': true});

Forum discussion on Twitter.

 

Popular Categories

The Pulse of the search community

Follow

Search Video Recaps

 
Gvolatility, Bing Generative Search, Reddit Blocks Bing, Sticky Cookies, AI Overview Ads &amp; SearchGPT - YouTube
Video Details More Videos Subscribe to Videos

Most Recent Articles

Search Forum Recap

Daily Search Forum Recap: July 26, 2024

Jul 26, 2024 - 10:00 am
Search Video Recaps

Google Volatility, Bing Generative Search, Reddit Blocks Bing, Sticky Cookies, AI Overview Ads & SearchGPT

Jul 26, 2024 - 8:01 am
Google

Google Gemini Adds Related Content & Verification Links

Jul 26, 2024 - 7:51 am
Other Search Engines

SearchGPT - OpenAI's AI Search Tool

Jul 26, 2024 - 7:41 am
Search Engine Optimization

Google's John Mueller: Don't Use LLMs For SEO Advice

Jul 26, 2024 - 7:31 am
Google

Google Search With Related Images Carousel Below Image Box

Jul 26, 2024 - 7:21 am
Previous Story: Google Featured Snippets Tests Related Query Refinements