openownership / data-standard-sphinx-theme

Documentation theme for the Beneficial Ownership Data Standard.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Put user analytics system in place #55

Closed siwhitehouse closed 3 years ago

siwhitehouse commented 4 years ago

We're not currently using Google Analytics to track readership of the documentation (ReadTheDocs admin)

And currently there's no in-built RTD analytics

If there is no other mechnism, then we should get something in place.

siwhitehouse commented 4 years ago

Copied from the (internal) Open Data Services issue at http://bods.opendataservices.coop/redmine/issues/510

stevenday commented 4 years ago

I believe this ticket is slightly out of date now that we use Matamo, however, we'd like to change this to Google Analytics so that all our usage analytics are available in one place. I can generate and provide the relevant GA code, but I presume we'll also need to update the privacy/cookies policy to refer to this.

siwhitehouse commented 4 years ago

@stevenday Yes, I failed to update the issue when I copied it across. We tell users that we use Matomo and we include that advice in Russian translation as well.

We do not currently have an agreed mechanism for making ad hoc updates to the website in between schema versions.

I've created a new issue for this at https://github.com/openownership/data-standard/issues/279

Lathrisk commented 4 years ago

It doesn't look like the piwik snippet is tracking anything too complex so imagine this will be a like-for-like replacement with Google Analytics.

@stevenday have you set up a Google Analytics account? I think they provide a snippet to insert that contains the GA code. Could you send that over, or provide access to the GA account?

(Also, I can set up a branch with the relevant changes into which the copy can be added once translation is resolved. If that matches the expected workflow.)

stevenday commented 4 years ago

@Lathrisk - I just created one, here's the snippet:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-158633237-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-158633237-1');
</script>

If the current code is doing anything fancy to track other resources (PDF downloads for example), we should probably use our Google Tag Manager setup instead (we have this on the main site since a lot of the resources are downloadable). Just let me know and I can set that up.

I think a new branch + PR which we can then resolve the translation issue on is ideal, thanks.