amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

AMP Adsence problem

Open jimmy-espace-musculation opened this issue 10 years ago • 8 comments

hello

I have probleme with adsense as you can see in the console :+1:

https://www.espace-musculation.com/squat.html/amp/#development=1

I have put this code

 <div class="ad-bas">
    <amp-ad width=300 height=200 type="adsense" data-ad-client="ca-pub-XXXXXXXXXXXX" data-ad-slot="XXXXXXX">    </amp-ad></div>

Is it possible that Cloudflare Rocket load is the problem ?

Have you got a solution ?

<div class="ad-bas"> <amp-ad width=300 height=200 type="adsense" data-ad-client="ca-pub-XXXX" data-ad-slot="XXXX"> </amp-ad></div>

Is this resolved as per #2331? The amp-ad call seems fine.

jmadler avatar Feb 28 '16 19:02 jmadler

Not resolved .... i can see errors but i have a message : AMP validation successful

Can you please clarify what the problem is? I can see a valid AMP ad. Do you have any screenshots of the issue / problem you are seeing? I can separately see AMP validation error in the developer console when i open your webpage in chrome - but none related to ads.

kashyapnitin avatar Mar 02 '16 12:03 kashyapnitin

@kashyapnitin:

https://www.espace-musculation.com/squat.html/amp/:7:0 The attribute 'type' in tag 'script type=application/ld+json' is set to the invalid value 'text/javascript'.tx.error @ cdn.ampproject.org/v0/validator.js:320

@jimmy-espace-musculation: The error is indeed Cloudflare injecting javascript into your page. It's not injecting the code when you're on a mobile device.

jridgewell avatar Mar 02 '16 16:03 jridgewell

"404_or_other_error_expected._Do_not_worry_about_it" :wink:

That's a speedup we do to make connecting to external servers faster. Unfortunately, it results in an error message in the console.

jridgewell avatar Mar 02 '16 20:03 jridgewell

Thanks you Justin :+1:

Jimmy from France