AMP analytics validation failed ?

Trying to figure out where to correct the failed Google Analytics AMP validation failures for validation test here. Any ideas ?


XF 1.5.13 with AMP 1.0.8

I also use Digital Point Better Analytics addon so maybe conflicting there ? Maybe Amp addon can exclude itself from other stats addons inserting code ?

Have you whitelisted AMP urls with it?

Also, do you use a JavaScript deferral add-on? You'll need to whitelist v0.js if so.
blacklisted in DB Optimise deferred js
set in ngx_pagespeed pagespeed.conf
pagespeed Disallow */amp/*;

look better now though validation still fails
You have a malformed div on that page.
<h2 class="messageh2">Files To Track</h2><br /><div90%";">
Also, use this to disable pagespeed for this add-on (since the urls are slightly different):
pagespeed Disallow "*?amp=1";
Awesome. There's two validation errors which look to be caused by a style property gone wrong. Specifically the 'bbCodebCode' one.

Then, I've just gotta figure out a way to whitelist the metadata for the AMP page in DB Tech's add-on. I'll contact them and ask since I have no experience with how that add-on works.
yeah fixed those, just one more to go and that is in PAGE_CONTAINER template i have

<xen:if is="{$isIndexPage} AND {$canSearch}">
<script type="application/ld+json">
    "@context": "",
    "@type": "WebSite",
    "url": "{xen:jsescape {xen:link canonical:index}}",
    "potentialAction": {
        "@type": "SearchAction",
        "target": "{xen:jsescape {xen:link canonical:search/search}}{xen:if $xenOptions.useFriendlyUrls, '?', '&'}keywords={search_keywords}",
        "query-input": "required name=search_keywords"
amp html doesn't like script tag

conditional to exclude from ?amp=1 ?
I don't have the code in front of me right now but that isn't the same thing that's causing your validation errors. The AMP add-on injects some metadata (which looks similar, but has some extra properties). Normally, this wouldn't be a problem but DB Optimise moves the script tag that holds this metadata from <head></head> and in to <body></body>, specifically at the bottom. AMP doesn't expect this metadata to be in that location so throws errors.

I've reached out to DB Tech to see what they can do about this and if it's possible for them to bake in an exclusion of some sort for AMP'd pages, which would be the ideal solution.
yeah found another blacklisted js for DB Optimise so these 3 need excluding
What are the issues with the other pages? Or is that just from the last time they were crawled?