Skip to content

Commit 5786207

Browse files
supadrupaproofit404
authored andcommitted
Setup Google Analytics. (#29)
1 parent 41ac4ea commit 5786207

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

configs/google-analytics.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GOOGLE_ANALYTICS_ID = UA-136933644-1

dry-python.org.lektorproject

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ target = ghpages+https://dry-python/dry-python.github.io?cname=dry-python.org
88

99
[packages]
1010
lektor-webpack-support = 0.5
11+
lektor-google-analytics = 0.1.3

templates/components/analytics.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% macro analytics() %}
2+
<div class="ga-script">{{ generate_google_analytics() }}</div>
3+
{% endmacro %}

templates/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{% from 'components/copyright.html' import copyright %}
33
{% from 'components/bundle.html' import bundle %}
44
{% from 'components/gitter_sidecar.html' import gitter_sidecar %}
5+
{% from 'components/analytics.html' import analytics %}
56
<!doctype html>
67
<head>
78
<meta charset="utf-8">
@@ -22,4 +23,5 @@
2223
{{ copyright() }}
2324
</footer>
2425
{{ gitter_sidecar() }}
26+
{{ analytics() }}
2527
</body>

0 commit comments

Comments
 (0)