How to Add Analytics in AMP

Follow this steps to add Analytics in AMP

First go to WordPress Admin Area -> AMP option panel -> Settings -> Analytics.

In Analytics Type Option you can use Google Analytics or any other Analytics of your choice.

  • Google Analytics: When you enable  Google Analytics, you must enter your Google Tracking ID. Pasting Scripts are not allowed. Even if you use other Analytics, make sure you Enter tracking ID but not the Script. If you paste any script in analytics, it will lead you to errors.  Once disable Advanced Google Analytics and you save Tracking id option output will be checked into source code it will be shown below the footer area.
  • IP Anonymization: Allow website owners to request that all of their users’ IP addresses are anonymized within the product. This feature is designed to help site owners comply with their own privacy policies.
  • For example, if a website visitor has a public IP of 12.214.31.144 then as soon as the IP data is received by the Analytics Collection Network, Google will anonymize/mask the IP to 12.214.31.0.
  • It is important to remember that IP anonymization occurs before any data storage or processing takes place. So Google does not store or process complete IP addresses at any given time.
  • AMP Linker: AMP Linker is a new feature in AMP that helps keep user session in sync. It works by decorating outgoing links from AMP cache with params such as AMP Client ID in a URL parameter. On the receiving side, your analytics provider consumes the parameter and writes it down as a first-party cookie for more details Click Here.
  • Advanced Google Analytics: If you enable this option you can  Enter your Advanced Analytics code here inside this code you have to write account number for ex :(“account”: “UA-xxxxxxx-x”).

Enabling the IP Anonymization feature in Google Analytics for analytics.js

The IP Anonymization feature in Google Analytics is not enabled by default.

You would need to enable it by making a small code change or by adding a new variable in your GTM tag.

  • Google Tag Manager: When you enable to use of Google Tag Manager, then you have to enter the Tag Manager ID.

General Analytics Providers

The below-shown details are about some of the General Analytics Providers which are supported by our plugin – Facebook Pixel, Segment Analytics, Matomo (Piwik) Analytics, Quantcast Measurement, comScore, Effective Measure, StatCounter, Histats Analytics, Yandex Metrika, Chartbeat Analytics, Alexa Metrics, AFS Analytics, Adobe Analytics…

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.

Share
Published by
Ahmed Kaludi

How to add Adobe Analytics in AMP

Follow these steps to add Adobe Analytics in AMP Step 1: Go to WordPress Admin Area -> AMP…

4 months ago

What is the CWV plugin all about

Core Web Vitals are the subset of Web Vitals that apply to all web pages,…

6 months ago

How to fix “Alternate page with proper canonical tag” Page Index issue in Google Search Console

The following reasons can be shown for non-indexing. Server error (5xx) Your server returned a 500-level…

8 months ago

Google Analytics ( GA4 ) integration in AMPforWP

We have added the Google Analytics 4 ( GA 4 ) integration in AMPforWP v1.0.80.…

1 year ago

How to add Marfell Analytics in AMP

In this article, I will show you how to add Dotmetrics Analytics to your AMP…

1 year ago

How to modify the H1-H6 size for mobile devices

In this option, we will show you how to modify the H1-H6 size for mobile…

1 year ago