AMP for WP is a popular WordPress plugin for Accelerated Mobile Pages that has built-in GDPR consent management (for AMP pages). This makes setting up AMP for WP with Complianz a relatively easy task, especially if you follow the steps outlined in this guide. There are some things that you should consider beforehand, though.
Points to consider when using AMP for WP
- Different Cookie Notice from the one shown on the “main” website
- Consent is managed separately from the “main” website
- GEO IP functionality does not work on AMP
- AMP Analytics only supports Universal Analytics (UA-) codes
Complianz, Google Analytics
In the Wizard > Statistics, you will be asked, “Do you compile statistics of this website”, select “Yes, with Google Analytics”. Next, make sure that Google Analytics is configured correctly to comply with GDPR guidelines so that you can gather anonymized statistics without consent. Note: In some countries (such as Germany), asking for consent for statistics is always required, even when anonymized.
Refer to this article for the Universal Analytics setup: https://complianz.io/how-to-configure-google-analytics-for-gdpr/
After verifying that Analytics has been set up correctly, tick the three boxes regarding the previous Analytics question, as seen in the screenshot below.
On the next page, select “Yes” to the question “Do you want Complianz to place your Analytics code” and place your Analytics tracking ID in the text box.
AMP for WP, Google Analytics
To correctly configure AMP for WP for Analytics and GDPR, we have to set two options. Open the Setup menu of the AMP for WP plugin, click Config next to Analytics Tracking, and enter your Tracking ID in the window that opens.
Note: You have to use your UA-code for AMP. UA will remain functional even if you have already upgraded to Google Analytics 4.
Next, click Choose next to Privacy Settings, and Enable the GDPR setting. This will enable a Cookie Consent banner on the AMP version of your site.
Your website will now send statistics to Analytics from both the AMP version and the main version of your website. You can verify that AMP correctly places your Analytics code by viewing the page source and searching for amp-analytics:
Make sure to check if you receive real-time page views in your Analytics Dashboard. Visit your AMP page in an Incognito window to make sure that the pageview gets registered.