Search code examples
google-analyticsamp-html

AMP equivalent for analytics anonymizeIp


I need to anonimaze my google analytics stats on AMP page

what is the AMP json equivalent for standard analytics code?

ga('set', 'anonymizeIp', true);

Solution

  • All the hits to Google Analytics from AMP are anonymized by default. There is no way to override this.

    See https://github.com/ampproject/amphtml/blob/master/extensions/amp-analytics/0.1/vendors.js

    'basePrefix': 'v=1&_v=a0&aip=true&_s=${requestCount}&' +