Hello, it would be very important to be able to integrate Hotjar scripts (https://www.hotjar.com/) on my website (wordpress + custom theme amp). I have researched the documentation for amp components and the list of supported vendors but can't find any option to do so.
I had high expectations with the arrival of amp-script, but it is not working to implement tracking scripts.
Can any of the current components be used to insert tracking scripts? Which one?
If this is not possible using a current component, do you consider the development of the feature viable? What is the usual deadline for new features?
Thank you!
Have you taken a look at amp-analytics to see if it meets your needs? @ampproject/wg-analytics
@caroqliu FWIW, Hotjar is one of the top players in this Analytics segment https://trends.builtwith.com/analytics But, it is not available in https://github.com/ampproject/amphtml/tree/master/extensions/amp-analytics/0.1/vendors
Hi @rrjanbiah! Thanks for your issue. Hotjar can be integrated into amp-analytics using this guide. However, it requires help from the vendor in question to make sure that the requests from AMP will be properly captured and configured.
Is think something you would like to contribute to the repo?
@micajuine-ho I have reached out to the Hotjar team. Based on their reply, will update
@micajuine-ho While I waited for them to reply, I quickly checked. It looks like current amp-analytics architecture wouldn't allow click tracking, heatmap, etc. In case, if that's already possible, can you please share the vendor that's already doing that?
From Hotjar support:
Unfortunately, AMP does not support third-party scripts (like ours) on their pages outside of iframes. Since iframes are sandboxed away from the rest of the site, it means Hotjar cannot access page information on your AMP pages. Unfortunately, unless Google changes how AMP works here, Hotjar will be unable to work.
@rrjanbiah There are a lot of vendors that use the "click" trigger. What are heatmaps?
Additionally, you can add your own configuration/triggers on to the default JSONs provided by the vendors.
@micajuine-ho Analytics is more than clicks... many providers offer playback of mouse moves aka session recordings.
For example, here's the one from Hotjar:
Animated GIF https://assets.hotjar.com/cs-team/knowlege_base/recordings/player_playback_viewer_demo.gif
Hi @rrjanbiah, amp-analytics does not offer session recordings as a trackable event. Here is a list of all the triggers that we offer.
Is session recordings something that you need?
@micajuine-ho Yes, that's an important requirement for any analytics company. Is there anything you can do to push it?
Is session recordings the only new feature that is necessary for your company? Or are there others?
@micajuine-ho Even GA had heatmap feature once, but they removed it. I think, clickmap, scrollmap, session recording (hover and keyboard events) are important. Noticed that hover is longtime pending #15114
Also, an example analytics provider https://www.inspectlet.io/includes/assets/session-recording-demo.mp4 with session recording.
@rrjanbiah We can take on this work in the future as a part of supporting custom browser events, such as hovering, keyboard events, and clicked.
Hello! Any updates on this? We're needing heatmap (hotjar) here too :(
We thought about disable/invalidate AMP, then try to use Hotjar, is it possible?
Hi, thank you for the bump. No updates as of yet, but we can start to plan the prioritization of the Tracking of Custom Browser Events. We can track the project here #17878
Once this project is in, then we can follow up with the Hotjar team and see if they can integrate into amp-analytics.
We thought about disable/invalidate AMP, then try to use Hotjar, is it possible?
I'm sorry, what do you mean by this?
It would be amazing. This kind of tool is essential for metrics and UX/UI
I'm sorry, what do you mean by this?
I mean like, insert hotjar script and install it manually, then AMP would be invalid because of these third party scripts, but my hotjar (heatmap) would work, wouldn't?
We made a logic that I could enable/disable hotjar, and AMP would be invalid/valid in consequence
UPDATE: Yes, it is possible. And it's working well :D
I mean like, insert hotjar script and install it manually, then AMP would be invalid because of these third party scripts, but my hotjar (heatmap) would work, wouldn't?
Ah I see what you mean. Yes you could install Hotjar script to run the Hotjar heatmap, but then it would be invalid AMP.
With the Tracking of Custom Browser Events that I mentioned above, once we get that done, we can integrate Hotjar as a first-party analytics vendor and then you use their analytics through <amp-analytics> and have valid AMP.
I mean like, insert hotjar script and install it manually, then AMP would be invalid because of these third party scripts, but my hotjar (heatmap) would work, wouldn't?
Ah I see what you mean. Yes you could install Hotjar script to run the Hotjar heatmap, but then it would be invalid AMP.
With the Tracking of Custom Browser Events that I mentioned above, once we get that done, we can integrate Hotjar as a first-party analytics vendor and then you use their analytics through
<amp-analytics>and have valid AMP.
This is going to be AWESOME. Thanks a lot for the attention and good luck on this project!