1
AUTHORS
1
AUTHORS
@@ -5,6 +5,7 @@ alphabetical order):
|
||||
- Alexey Bazhin
|
||||
- Andreas Sieferlinger
|
||||
- Antoine Pitrou
|
||||
- Brent Bandelgar (@brentbb)
|
||||
- Cédric Bosdonnat
|
||||
- Christophe-Marie Duquesne
|
||||
- @datro
|
||||
|
||||
@@ -39,6 +39,7 @@ _DEFAULT_CONFIG = {
|
||||
'destination': '_build',
|
||||
'files_to_copy': (),
|
||||
'google_analytics': '',
|
||||
'google_tag_manager': '',
|
||||
'ignore_directories': [],
|
||||
'ignore_files': [],
|
||||
'img_processor': 'ResizeToFit',
|
||||
|
||||
@@ -171,6 +171,9 @@ ignore_files = []
|
||||
# Google Analytics tracking code (UA-xxxx-x)
|
||||
# google_analytics = ''
|
||||
|
||||
# Google Tag Manager tracking code (GTM-xxxxxx)
|
||||
# google_tag_manager = ''
|
||||
|
||||
# Piwik tracking
|
||||
# tracker_url must not contain trailing slash.
|
||||
# Example : {'tracker_url': 'http://stats.domain.com', 'site_id' : 2}
|
||||
|
||||
@@ -18,8 +18,10 @@
|
||||
</style>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% include 'analytics.html' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include 'gtm.html' %}
|
||||
<div class="container">
|
||||
<div class="four columns">
|
||||
<div class="sidebar">
|
||||
@@ -45,7 +47,6 @@
|
||||
</div>
|
||||
|
||||
{% block footer %}{% endblock %}
|
||||
{% include 'analytics.html' %}
|
||||
{% include 'piwik.html' %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
{% if settings.google_analytics %}
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '{{ settings.google_analytics }}']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
(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','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
(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>
|
||||
ga('create', '{{ settings.google_analytics }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
11
sigal/themes/default/templates/gtm.html
Normal file
11
sigal/themes/default/templates/gtm.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% if settings.google_tag_manager %}
|
||||
<!-- Google Tag Manager -->
|
||||
<noscript><iframe src="//www.googletagmanager.com/ns.html?id={{settings.google_tag_manager}}"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','{{settings.google_tag_manager}}');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
{% endif %}
|
||||
@@ -27,8 +27,10 @@
|
||||
<style type="text/css">
|
||||
</style>
|
||||
{% endif %}
|
||||
{% include 'analytics.html' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include 'gtm.html' %}
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1><a href="{{ album.index_url }}">{{ index_title }}</a></h1>
|
||||
@@ -303,7 +305,6 @@
|
||||
|
||||
</script>
|
||||
{% endif %}
|
||||
{% include 'analytics.html' %}
|
||||
{% include 'piwik.html' %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
<script src="{{ theme.url }}/photoswipe-ui-default.min.js"></script>
|
||||
<script src="{{ theme.url }}/echo/echo.min.js"></script>
|
||||
{% endblock %}
|
||||
{% include 'analytics.html' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include 'gtm.html' %}
|
||||
<div class="container">
|
||||
<h1><a href="{{ album.index_url }}">{{ index_title }}</a></h1>
|
||||
|
||||
@@ -396,7 +398,6 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% include 'analytics.html' %}
|
||||
{% include 'piwik.html' %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user