Skip to content

Commit

Permalink
Merge pull request #30 from IgniteUI/tiliev/gtm-accounts
Browse files Browse the repository at this point in the history
Added environment specific GTM container ids.
  • Loading branch information
tiliev authored Aug 6, 2018
2 parents ebca99c + 337d422 commit 170c88d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
6 changes: 4 additions & 2 deletions layout/_master.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ full license information.}} {{!include(/^styles/.*/)}} {{!include(/^fonts/.*/)}}
{{>partials/head}}

<body data-spy="scroll" data-target="#affix" data-nav-base-url="{environment:infragisticsBaseUrl}" data-lang="{{_language}}" data-theme="{{_productThemeName}}">
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T65CF7" height="0" width="0" style="display:none;visibility:hidden"></iframe>
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id={environment:GTMContainerId}" height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<header>
{{^_disableNavbar}} {{>partials/navbar}} {{/_disableNavbar}} {{^_disableBreadcrumb}} {{!>partials/breadcrumb}} {{/_disableBreadcrumb}}
</header>
Expand Down
1 change: 0 additions & 1 deletion partials/footer.tmpl.partial
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
{{{_appFooter}}} {{^_appFooter}} {{#_isLangEn}} {{>partials/infrafoot}} {{/_isLangEn}} {{^_isLangEn}} {{>partials/infrafoot.ja}}
{{/_isLangEn}}
</div>
<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-T65CF7');</script>
7 changes: 7 additions & 0 deletions partials/head.tmpl.partial
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ full license information.}}
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
<link rel="stylesheet" href="{{_rel}}styles/css/main.css">
<script type="text/javascript" src="{{_rel}}styles/sample-iframe-handler.js"></script>
<!-- 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','{environment:GTMContainerId}');</script>
<!-- End Google Tag Manager -->
</head>
18 changes: 12 additions & 6 deletions post-processors/PostProcessors/EnvironmentVariables/preconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,35 @@
"en": {
"development": {
"demosBaseUrl": "http://localhost:4200",
"infragisticsBaseUrl": "https://staging.infragistics.local"
"infragisticsBaseUrl": "https://staging.infragistics.local",
"GTMContainerId": "GTM-WLXLBZD"
},
"staging": {
"demosBaseUrl": "https://staging.infragistics.local/angular-demos",
"infragisticsBaseUrl": "https://staging.infragistics.local"
"infragisticsBaseUrl": "https://staging.infragistics.local",
"GTMContainerId": "GTM-NCKNPN"
},
"production": {
"demosBaseUrl": "https://www.infragistics.com/angular-demos",
"infragisticsBaseUrl": "https://www.infragistics.com"
"infragisticsBaseUrl": "https://www.infragistics.com",
"GTMContainerId": "GTM-T65CF7"
}
},
"jp": {
"development": {
"demosBaseUrl": "http://localhost:4200",
"infragisticsBaseUrl": "https://jp.staging.infragistics.local"
"infragisticsBaseUrl": "https://jp.staging.infragistics.local",
"GTMContainerId": "GTM-NNHVMC7"
},
"staging": {
"demosBaseUrl": "https://jp.staging.infragistics.local/angular-demos",
"infragisticsBaseUrl": "https://jp.staging.infragistics.local"
"infragisticsBaseUrl": "https://jp.staging.infragistics.local",
"GTMContainerId": "GTM-WLWSDK"
},
"production": {
"demosBaseUrl": "https://jp.infragistics.com/angular-demos",
"infragisticsBaseUrl": "https://jp.infragistics.com"
"infragisticsBaseUrl": "https://jp.infragistics.com",
"GTMContainerId": "GTM-KVNSWJ"
}
}
},
Expand Down

0 comments on commit 170c88d

Please sign in to comment.