Are you seeing a lot of AMP traffic from cdn.ampproject.org to your site?
If you’re using the AMP addon, Google is likely caching some of those AMP pages and sending you the traffic, and then counting it as a referral.
To avoid this, you’ll want to use a referral exclusion for cdn.ampproject.org. In this guide, we’ll show you how.
Use referral exclusion
We recommend adding a referral exclusion with the following domain: cdn.ampproject.org.
This will prevent all cached AMP subdomains served by Google from breaking sessions incorrectly.
Adding to the Referral Exclusion List (UA)
Step 1: Sign into Analytics account at https://analytics.google.com.
Step 2: Click Admin.
Step 3: In the ACCOUNT column, use the dropdown to select the Analytics account that contains the property you want to work with.
Step 4: In the PROPERTY column, use the dropdown to select your property.
Step 5: Click Tracking Info.
Step 6: Click Referral Exclusion List.
Step 7: To add a domain, click + ADD REFERRAL EXCLUSION.
Step 8: Enter cdn.ampproject.org.
Step 9: Click Create to save.
Adding to the List unwanted referrals (GA4)
Step 1: Sign in to your Analytics account at https://analytics.google.com.
Step 2: Click Admin in the lower left of the page.
Step 3: In the All accounts dropdown menu at the top of the page, select the account with the property you want to update.
Step 4: In the Properties & Apps column, use the dropdown to select your property.
Step 5: Click Data Streams In the Property column.
When the list of data streams displays, select the data stream for the site you want to update.
Step 6: Scroll down to the Additional Settings section and click on More Tagging Settings.
Step 7: Click on List unwanted referrals at the bottom of the tagging settings page.
Step 8: In the Configuration form, select “Referral domain exactly matches” from the Match type dropdown. Enter cdn.ampproject.org into the Domain field. Click the Save in the upper right of the page.
Note: If there’s already a condition in the Configuration form, click on the Add condition button to add a new one.
Step 9: Click the Save button at the upper right of the page.
That’s it! Now you know how to set a referral exclusion (UA) and list unwanted referrals (GA4) for your cdn.ampproject.com, so Google Analytics doesn’t count Google’s AMP CDN as a referral for your AMP pages.
Are you interested in setting up Facebook Instant Articles? Then please see our guide: How to Get Started With the Facebook Instant Articles Addon.