Live chat is not working on AMP-first Wordpress blog
Hey.
This is Arturs from Magebit. We have an AMP website ourselves and stumbled upon this issue also.
AMP doesn't really allow custom javascript code. Therefore, live chats on AMP are tricky. It is possible to apply for developer mode where you are able to write limited javascript on your site but I think it will still not be enough to use HubSpot's live chat module properly.
Unless HubSpot releases an AMP version of the live chat, I don't see a way to get AMP and their live chat to working together.
I've seen AMP + live chats (i.e. facebook live chat on AMP sites) so it is possible. Just not with HubSpot for now. Hopefully, they will come up with an AMP live chat soon 🙂
Live chat is not working on AMP-first Wordpress blog
@someshwar - First, I would ensure that you can actually put script tags and javascript code in the place where you are putting that HS embed code. I'm not exactly sure from the screenshot, which file you have your embed code in, or if it's a plugin like "Simple Custom CSS / JS" that let's you inject code.
So, first step to debug is to replace your HS code with this code -
<script>alert();</script>
If you see a popup appear on the page, then you know the problem is most likely the script source.
If the alert() happens, next I would try injecting the HS code dynamically with this code:
Live chat is not working on AMP-first Wordpress blog
I notice you have a cache plugin. Did you make sure when you used the custom CSS plugin that the cached version wasn't being delivered? Can you disable the cache while you're in development?