1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| <!doctype html>
<html lang="fr">
<head>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(["_setAccount", "UA-xxxxxxx"]);
_gaq.push(["_trackPageview"]);
_gaq.push( ["_setCustomVar", 1, "test at <?php echo date('Y:m:d.'); ?>" ,1, 1] );
(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);
})();
//gaU
(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');
</script>";
<meta charset="utf-8">
<title>Titre de la page</title>
</head>
<body >
<div style="text-align: center; margin-top:20%">
Test GA
</div>
<script type="text/javascript">
ga('create', 'UA-xxxxxxx', 'xxxxxx.com');
ga('set', 'dimension1', 'test 1');
ga('send', 'pageview');
</script>
</body>
</html> |
Partager