Skip to content

Commit

Permalink
Merge pull request #486 from HXLStandard/feat/HDX-9703-GTM-tag
Browse files Browse the repository at this point in the history
HDX-9703 - Add GTM to https://proxy.hxlstandard.org/
  • Loading branch information
aalecs authored Jun 6, 2024
2 parents e9da47b + f1d3d21 commit e7b6a9c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.py.TEMPLATE
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,5 @@ ITOS_CACHE_TIMEOUT = 604800
#
GOOGLE_CLIENT_ID = os.getenv('GOOGLE_CLIENT_ID', '<client id>')
GOOGLE_OAUTH_ID = os.getenv('GOOGLE_OAUTH_ID', '<oauth id>')

GOOGLE_TAG_MANAGER_ID = os.getenv('GOOGLE_TAG_MANAGER_ID', '<google tag manager id>')
# end
1 change: 1 addition & 0 deletions hxl_proxy/default_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

GOOGLE_CLIENT_ID = 'UNSPECIFIED'
GOOGLE_OAUTH_ID = 'UNSPECIFIED'
GOOGLE_TAG_MANAGER_ID = 'UNSPECIFIED'
9 changes: 9 additions & 0 deletions hxl_proxy/templates/includes/headers.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<!-- 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','{{ config.get('GOOGLE_TAG_MANAGER_ID') }}');
</script>
<!-- End Google Tag Manager -->

<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand Down
4 changes: 4 additions & 0 deletions hxl_proxy/templates/includes/navbar.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src=https://www.googletagmanager.com/ns.html?id={{ config.get('GOOGLE_TAG_MANAGER_ID') }}
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<nav role="navigation" class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
Expand Down

0 comments on commit e7b6a9c

Please sign in to comment.