Loreb
Loreb

Reputation: 47

Cloudflare Pages Web Analytics breaks AMP pages

Hope I can help avoiding surprises. I couldn't find any documentation on this behaviour.

On Cloudflare Pages you can activate Web Analytics with the automatic setup button.

enter image description here

If you have AMP pages you will experience a spike in errors from the Webmaster Tools. enter image description here

What happen is that Cloudflare doesn't respect the restrains about custom javascript on AMP pages.

enter image description here

The AMP validator output: enter image description here

The page "configuring web analytics" declares: enter image description here

Inside "Manage site" in "Advanced options" there's no "add rule" option. You only have a checkbox with "Disable automatic setup". enter image description here

What's recommended is to install the snippet manually in the pages you want to be tracked and avoid it on AMP pages.

Upvotes: 0

Views: 176

Answers (0)

Related Questions