Ticket #10992 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Add google analytics to docs template for online help

Reported by: Peter Peterson Owned by: Peter Peterson
Priority: major Milestone: Release 3.4
Component: Documentation Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

The secret sauce is to add the following to the header of the page templates. This will only enable tracking for online help, but should be a very good start.

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-59110517-1', 'auto');
  ga('send', 'pageview');

</script>

Change History

comment:1 Changed 6 years ago by Peter Peterson

  • Status changed from new to assigned
  • Owner changed from Nick Draper to Peter Peterson

comment:2 Changed 6 years ago by Pete Peterson

  • Status changed from assigned to inprogress

Added if section for google analytics in online help.

Refs #10992

Changeset: e59f0ba6aca196ef0beef3a1bc3ad71a2dec2860

comment:3 Changed 6 years ago by anonymous

Can one of the admins verify this patch?

comment:4 Changed 6 years ago by Stuart Campbell

jenkins test this please

comment:5 Changed 6 years ago by Pete Peterson

Jenkins please test this

comment:6 Changed 6 years ago by Pete Peterson

test this please

comment:7 Changed 6 years ago by Pete Peterson

retest this please

comment:8 Changed 6 years ago by Peter Peterson

  • Status changed from inprogress to verify
  • Resolution set to fixed

This is being verified in pull/155

comment:9 Changed 6 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:10 Changed 6 years ago by Pete Peterson

The ubuntu builder was unable to checkout the code. That error can be ignored and the pull request merged.

comment:11 Changed 6 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge pull request #155 from mantidproject/10992_google_analytics

Added if section for google analytics in online help.

Full changeset: 5b4d9e8e2f73ba1308765504b101a0a66a86aa13

comment:12 Changed 6 years ago by Martyn Gigg

Checked the files locally and the section appears in the HTML but not Qt help as expected.

comment:13 Changed 6 years ago by Martyn Gigg

Merge pull request #155 from mantidproject/10992_google_analytics

Added if section for google analytics in online help.

Full changeset: 5b4d9e8e2f73ba1308765504b101a0a66a86aa13

comment:14 Changed 6 years ago by Nick Draper

  • Milestone changed from Backlog to Release 3.4

moved to r 3.4 as tickets are closed

comment:15 Changed 5 years ago by Nick Draper

  • Component changed from Framework to Documentation

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11831

Note: See TracTickets for help on using tickets.