Skip to content

Commit 0991354

Browse files
committed
adicionado google analitics
1 parent 497f3a4 commit 0991354

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

pelicanconf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
GITHUB_URL = 'https://github.com/pythonclub/pythonclub.github.io'
1212
DISQUS_SITENAME = 'pythonclub'
1313

14+
GOOGLE_ANALYTICS = 'UA-50935105-1'
1415
FACEBOOK_APPID = '1487080281503641'
1516

1617
TIMEZONE = 'America/Sao_Paulo'

theme/templates/analytics.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{% if GOOGLE_ANALYTICS %}
2-
<script type="text/javascript">
3-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl./" : "http://www./");
4-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
5-
</script>
6-
<script type="text/javascript">
7-
try {
8-
var pageTracker = _gat._getTracker("{{ GOOGLE_ANALYTICS }}");
9-
pageTracker._trackPageview();
10-
} catch(err) {}
2+
<script>
3+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
4+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
5+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
6+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
7+
8+
ga('create', '{{ GOOGLE_ANALYTICS }}', 'pythonclub.com.br');
9+
ga('send', 'pageview');
10+
1111
</script>
1212
{% endif %}

0 commit comments

Comments
 (0)