Spot analytics


 * This page describes the analytics for http://spot.mpdl.mpg.de, done with Piwik

= Direct Link =
 * View

= Configuration=


 * 1 Copy the following snippet (!!! THIS SNIPPET WORKS ONLY FOR SPOT!!!):

 var _paq = _paq || []; _paq.push(["setCustomVariable", 1, "Institute (from IP)", document.getElementById("instituteNameForIP").value, "visit"]); _paq.push(["setCustomVariable", 2, "Institute ID (from IP)", document.getElementById("instituteIdForIP").value, "visit"]); if(document.getElementById("instituteNameForUser").value != ''){ _paq.push(["setCustomVariable", 3, "User organization (logged in)", document.getElementById("instituteNameForUser").value, "visit"]); } _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function {   var u="//analytics.mpdl.mpg.de/";    _paq.push(['setTrackerUrl', u+'piwik.php']);    _paq.push(['setSiteId', 34]);    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);  }); 


 * 2 Go to http://spot.mpdl.mpg.de
 * 3 Log in as Admin
 * 4 Go to http://spot.mpdl.mpg.de/config
 * 5 Paste Snippet into textarea "Snippet"
 * 6 save

Implementation

 * Analytics are done via Piwik by including the javascript tracking code (see ). Default analytics are generated automaticcaly
 * For further analytics, we use the [piwik.org/docs/custom-variables/ custom variables] mechanism:
 * Institute (from IP) : Give the institute name according to the IP (see ) of the user
 * Institute ID (from IP): Give the institute ID according to the IP (see ) of the user
 * User organization (logged in): Give the name of the first Organization of the imeji user (i.e only for logged in users) as defined in imeji

IP tracking

 * IMPORTANT: No IP will recorded. Piwik uses traoncated IPs, and imeji just read the IP to get the Institute of the user
 * For the mapping of IP of MPIs IP and names, we use supported by MPDL resource: http://www2.mpdl.mpg.de/seco-irmapubl/expoipra_mpi?style=expo01
 * NOTE: Correct processing the list by imeji and piwik from IPs, other than MPDL IP range, can be tested in open library of Max-Planck-Institut für Sozialrecht und Sozialpolitik (4th Stock).
 * When a new User comes into spot, imeji reads the IP and check if the IP is belongs to one MPI (according to the previous list)