CMS Development

ThorstenScherba
Member

Problems with Hubspot-code for cookie-notice and AMP

Dear Ladies and Gentlemen,

I want to use the Hubspot-cookie-notice in my website's AMP.
When only installing the code into wordpress, the Cookie-notice will appear on Desktop and mobile version without AMP, but not the AMP sites.
After copying the code into the AMP-plugin in Wordpress, the cookie notice is being shown on mobile AMP. One day later, I received a warning from Google Search Console, that customized JavaScript is not allowed and those pages are not being shown in search results any more.

0 Upvotes
2 Replies 2
ThorstenScherba
Member

Problems with Hubspot-code for cookie-notice and AMP

Hi @jennysowyrda ,

 

Yes, I did.

Screenshots, sure.
Which Screenshots would help?
You know the hubspot-code, it is entered into the <body> of my website.

FireShot Capture 270 - Theme Options ‹ Auszeit-Co_ - https___auszeit-coaching.com_wp-admin_admin.php.jpg

The code for GDPR works fine, just as it is supposed to be:

https://auszeit-coaching.com/amp


But the code causes the problem shown in Google Search Console, that 29 of my pages have an error in AMP.
"Custom Java Script is not allowed"

So how can I solve this?

Kind regards,
Thorsten

0 Upvotes
jennysowyrda
Community Manager
Community Manager

Problems with Hubspot-code for cookie-notice and AMP

Hi @ThorstenScherba,

 

Have you removed the HubSpot code to confirm that this resolves the issue? As the pages are external, it is hard to know what else could be causing issues on your page.

 

The more information, screenshots and details you can provide, the better the Community can assist!

 

Thank you,
Jenny

0 Upvotes