Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 1 | {% if GOOGLE_ANALYTICS %} |
| 2 | <script type="text/javascript"> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 3 | var _gaq = _gaq || []; |
| 4 | _gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS }}']); |
| 5 | _gaq.push(['_trackPageview']); |
| 6 | |
| 7 | (function() { |
| 8 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
pR0Ps | 4f64613 | 2013-12-11 08:25:14 -0500 | [diff] [blame] | 9 | ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js'; |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 10 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
| 11 | })(); |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 12 | </script> |
| 13 | {% endif %} |