Skip to content

Commit

Permalink
Update GTAG in conf.py instead of layout.html (#2474)
Browse files Browse the repository at this point in the history
  • Loading branch information
Svetlana Karslioglu authored Jun 16, 2023
1 parent 1e5ec44 commit f0e587e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions _templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
{% extends "!layout.html" %}

{%- block extrahead %}
{{ super() }}
<!-- Google Tag Manager -->
<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=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-T8XT4PS');</script>
<!-- End Google Tag Manager -->
{% endblock %}

{%- block content %}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T8XT4PS"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

{{ super() }}
<script>
if((window.location.href.indexOf("/prototype/")!= -1) && (window.location.href.indexOf("/prototype/prototype_index")< 1))
Expand Down
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def reset_seeds(gallery_conf, fname):
'display_version': True,
'navigation_with_keys': True,
'logo_only': False,
'analytics_id': 'UA-117752657-2',
'analytics_id': 'GTM-T8XT4PS',
}


Expand Down

0 comments on commit f0e587e

Please sign in to comment.