Skip to content

Commit

Permalink
GA4 fix (forgot to inline tag)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChHarding committed Jun 20, 2023
1 parent 11c1ac3 commit 8a1b87b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions touchterrain/server/TouchTerrain_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@

# a JS script to init google analytics, so I can use ga send on the pages with preview and download buttons
def make_GA_script(page_title):
html = """<title>TouchTerrain: processing finished. Settings used:""" + page_title + """</title>"""
html = """<title>Settings:""" + page_title + """</title>"""
if GOOGLE_ANALYTICS_TRACKING_ID:
html += """
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EGX5Y3PBYH"></script>
<script>
html += """<script async src="https://www.googletagmanager.com/gtag/js?id""" + GOOGLE_ANALYTICS_TRACKING_ID + "></script>"
html += """<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
Expand Down
2 changes: 1 addition & 1 deletion touchterrain/server/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@


{% if GOOGLE_ANALYTICS_TRACKING_ID %}
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EGX5Y3PBYH"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id={{GOOGLE_ANALYTICS_TRACKING_ID}}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
Expand Down

0 comments on commit 8a1b87b

Please sign in to comment.