Merge pull request #71 from dcanones/master
Opengraph and Twittercard URLS fixing + new g.analytics global tracker
This commit is contained in:
commit
dcf97aa637
@ -222,3 +222,4 @@ Headline: Resume of article
|
|||||||
This is the content of my super blog post.
|
This is the content of my super blog post.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Test
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
{% if GOOGLE_ANALYTICS %}
|
{% if GOOGLE_ANALYTICS %}
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _gaq = _gaq || [];
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
_gaq.push(['_setAccount', '{{GOOGLE_ANALYTICS}}']);
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
_gaq.push(['_trackPageview']);
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
(function() {
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
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';
|
ga('create', '{{GOOGLE_ANALYTICS}}', 'auto');
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
ga('send', 'pageview');
|
||||||
})();
|
</script>
|
||||||
</script>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if GAUGES %}
|
{% if GAUGES %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var _gauges = _gauges || [];
|
var _gauges = _gauges || [];
|
||||||
(function() {
|
(function() {
|
||||||
var t = document.createElement('script');
|
var t = document.createElement('script');
|
||||||
@ -23,14 +22,14 @@
|
|||||||
var s = document.getElementsByTagName('script')[0];
|
var s = document.getElementsByTagName('script')[0];
|
||||||
s.parentNode.insertBefore(t, s);
|
s.parentNode.insertBefore(t, s);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if PIWIK_URL and PIWIK_SITE_ID %}
|
{% if PIWIK_URL and PIWIK_SITE_ID %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{% if PIWIK_SSL_URL %}
|
{% if PIWIK_SSL_URL %}
|
||||||
var pkBaseURL = "{{ PIWIK_SSL_URL }}";
|
var pkBaseURL = "{{ PIWIK_SSL_URL }}";
|
||||||
{% else %}
|
{% else %}
|
||||||
var pkBaseURL = "{{ PIWIK_URL }}";
|
var pkBaseURL = "{{ PIWIK_URL }}";
|
||||||
{% endif %}
|
{% endif %}
|
||||||
var _paq = _paq || [];
|
var _paq = _paq || [];
|
||||||
_paq.push(["trackPageView"]);
|
_paq.push(["trackPageView"]);
|
||||||
@ -42,5 +41,5 @@
|
|||||||
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
||||||
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<meta property="twitter:image" content="{{ SITEURL }}/{{ article.twitter_image }}">
|
<meta property="twitter:image" content="{{ SITEURL }}/{{ article.twitter_image }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif article.header_cover %}
|
{% elif article.header_cover %}
|
||||||
<meta name="twitter:image" content="{{ SITEURL }}/{{ article.header_cover }}">
|
<meta name="twitter:image" content="{{ SITEURL }}{{ article.header_cover }}">
|
||||||
{% elif HEADER_COVER %}
|
{% elif HEADER_COVER %}
|
||||||
<meta name="twitter:image" content="{{ SITEURL }}/{{ HEADER_COVER }}">
|
<meta name="twitter:image" content="{{ SITEURL }}/{{ HEADER_COVER }}">
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<meta property="og:image" content="{{ SITEURL }}/{{ article.og_image }}">
|
<meta property="og:image" content="{{ SITEURL }}/{{ article.og_image }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif article.header_cover %}
|
{% elif article.header_cover %}
|
||||||
<meta property="og:image" content="{{ SITEURL }}/{{ article.header_cover }}">
|
<meta property="og:image" content="{{ SITEURL }}{{ article.header_cover }}">
|
||||||
{% elif HEADER_COVER %}
|
{% elif HEADER_COVER %}
|
||||||
<meta property="og:image" content="{{ SITEURL }}/{{ HEADER_COVER }}">
|
<meta property="og:image" content="{{ SITEURL }}/{{ HEADER_COVER }}">
|
||||||
{% else %}
|
{% else %}
|
||||||
|
Loading…
Reference in New Issue
Block a user