Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (49 sloc) 2.29 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<title></title>
</head>
<body>
<!-- Include both these scripts or copy them into your main JavaScript file -->
<!--[if lt IE 10]>
<script type="text/javascript" src="http://veddecode.opensource.dpo.org.uk/js/base64-1.1.min.js"></script>
<![endif]-->
<script type="text/javascript" src="http://veddecode.opensource.dpo.org.uk/js/ved_analytics-1.1.min.js"></script>
<script type="text/javascript">
// Use this code with (the old) version of Analytics (ga.js)
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']); // Your Analytics property ID
// The custom variable code needs to go *before* _trackPageview
(function(w) {
var customVars = [
{ slot: 1, name: 'Google link index', v: 'linkIndex' },
{ slot: 2, name: 'Google link type', v: 'linkType' },
{ slot: 3, name: 'Google result position', v: 'resultPosition' },
{ slot: 4, name: 'Google sub-result position', v: 'subResultPosition' },
{ slot: 5, name: 'Google page', v: 'page' }
];
if (w.VedDecode && w.VedDecode.ved) {
for (var i = 0, val; i < customVars.length; ++i) {
val = w.VedDecode[customVars[i].v];
_gaq.push([
'_setCustomVar',
customVars[i].slot,
customVars[i].name,
val ? val + '' : '(not set)',
2 // session scope
]);
}
}
})(window);
_gaq.push(['_trackPageview']); // Record the pageview last of all
// Standard Google code to load ga.js
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>