Jump to content

Recommended Posts

Posted (edited)
We use HAP as the main school student homepage. We want to work out how often students use some websites the school pays ££££ to subscribe too. goggle analytics's would be the obvious option to record a event when they click on a link. https://support.google.com/analytics/answer/1136920?hl=en extract
 You'll also need to add (or modify) the onclick attribute to your links. Use this example as a model for your own links: [url="http://www.example.com"]Check out example.com[/url]

Dose anyone know where I could adjust the "a href" to include the needed

onclick="trackOutboundLink('http://www.example.com'); return false;

so they match the example in the suport.google.com link above

Edited by rheibel
solved
  • 3 weeks later...
Posted (edited)
Finally had time to look properly in to this with a working solution. Obviously try at own risk with a secondary hap server !!! 2 files need modification: masterpage.master and hap.web.js.js masterpage.master needs both the goggle Java Scripts for analytics's and the code in the master attachment just before the closing head> line.
https://support.google.com/analytics/answer/7478520?hl=en&ref_topic=1008079 

then in hap.web.js.js function starting on line 252 needs replacing with see hap.web.javascript.txt That's it. when a student uses a on-line resource we see the events arriving in goggle analytics's and can see what on-line services get used and if a sites usage justifies there renewal cost :) p.s i changes goggles example code so sites open in a new window if you dont want this behaver replace "window.open" with "document.location" in the masterpage.master file

hap.web javascript.txt

master extra code.txt

Edited by rheibel

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...