hotosm / matomo-tracking

Tracking code and opt-out form for our websites
1 stars 0 forks source link

Add Hotjar to work within consent agreement #3

Open smit1678 opened 5 years ago

smit1678 commented 5 years ago
// <!-- Hotjar Tracking Code for hotosm.org -->
(function(h,o,t,j,a,r){
    h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
    h._hjSettings={hjid:1137117,hjsv:6};
    a=o.getElementsByTagName('head')[0];
    r=o.createElement('script');r.async=1;
    r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
    a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
// <!-- End of Hotjar code -->
dakotabenjamin commented 5 years ago

Some questions:

  1. is this only for TM3 or for all sites?
  2. are there configurations to manage or site-based IDs like in matomo?
  3. Can I get access to the hotjar site?
smit1678 commented 5 years ago

is this only for TM3 or for all sites?

I think we only really care about running this for TM3 for a month or so. We don't need to run this across all sites.

are there configurations to manage or site-based IDs like in matomo?

site-based IDs. But if it's easier we can probably just use one and run it across all our sites unless there is potential impact.

Can I get access to the hotjar site?

I created a new account with the sysadmin email and added it to Lastpass so you should have access now.

dakotabenjamin commented 5 years ago

cdn.hotosm.org/tracking-v2.js has that code. I'll update the open pr https://github.com/hotosm/tasking-manager/pull/1288 with those changes and ask ethan to give approval

smit1678 commented 5 years ago

Ok awesome. Here is the updated code for the hotjar account you should have access to:

<!-- Hotjar Tracking Code for https://tasks.hotosm.org -->
<script>
    (function(h,o,t,j,a,r){
        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
        h._hjSettings={hjid:1147905,hjsv:6};
        a=o.getElementsByTagName('head')[0];
        r=o.createElement('script');r.async=1;
        r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
        a.appendChild(r);
    })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>