amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Compatibility to integrate Hotjar

Open PilarDCV opened this issue 6 years ago • 24 comments

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!

PilarDCV avatar Apr 02 '20 19:04 PilarDCV

Have you taken a look at amp-analytics to see if it meets your needs? @ampproject/wg-analytics

caroqliu avatar Apr 03 '20 13:04 caroqliu

@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

rrjanbiah avatar Jun 13 '20 08:06 rrjanbiah

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 avatar Jun 15 '20 17:06 micajuine-ho

@micajuine-ho I have reached out to the Hotjar team. Based on their reply, will update

rrjanbiah avatar Jun 18 '20 18:06 rrjanbiah

@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?

rrjanbiah avatar Jun 19 '20 10:06 rrjanbiah

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 avatar Jun 19 '20 17:06 rrjanbiah

@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 avatar Jun 19 '20 20:06 micajuine-ho

@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

rrjanbiah avatar Jun 19 '20 20:06 rrjanbiah

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 avatar Jun 19 '20 21:06 micajuine-ho

@micajuine-ho Yes, that's an important requirement for any analytics company. Is there anything you can do to push it?

rrjanbiah avatar Jun 20 '20 15:06 rrjanbiah

Is session recordings the only new feature that is necessary for your company? Or are there others?

micajuine-ho avatar Jun 22 '20 16:06 micajuine-ho

@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 avatar Jun 22 '20 18:06 rrjanbiah

@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.

micajuine-ho avatar Jun 23 '20 17:06 micajuine-ho

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?

luiznasciment0 avatar Dec 04 '20 17:12 luiznasciment0

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?

micajuine-ho avatar Dec 09 '20 17:12 micajuine-ho

It would be amazing. This kind of tool is essential for metrics and UX/UI

luiznasciment0 avatar Dec 09 '20 18:12 luiznasciment0

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

luiznasciment0 avatar Dec 09 '20 18:12 luiznasciment0

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.

micajuine-ho avatar Dec 10 '20 19:12 micajuine-ho

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!

luiznasciment0 avatar Dec 10 '20 19:12 luiznasciment0

Hey @micajuine-ho ,

Looking at integrating with Hotjar too. Has there been any progress on your last message from Dec 11, 2020?

Thanks

J-uliane avatar Jul 19 '21 05:07 J-uliane