Skip to content

Commit

Permalink
Gtm container snippet added (#678)
Browse files Browse the repository at this point in the history
Add GTM container snippet
  • Loading branch information
jfaMan authored Nov 19, 2021
1 parent 72e2e92 commit 009cbe6
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 113 deletions.
4 changes: 4 additions & 0 deletions _includes/gtm_body_container.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MLP9R8N"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
8 changes: 8 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
<meta property="og:description" content="{% if page.title %}{{ page.title }}{% else %}Iron.io Dev Center{% endif %}" />
<meta name="description" content="{% if page.title %}{{ page.title }}{% else %}Iron.io Dev Center{% endif %}" />

<!-- 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-MLP9R8N');</script>
<!-- End Google Tag Manager -->

<meta name="google-site-verification" content="_p0K1FT08lpHP3jvMJON4-koeaHVqMPwCB8GOEMqucQ" />
<link type="text/css" rel="stylesheet" href="/css/application.css" />
<link type="text/css" rel="stylesheet" href="/css/global.css" />
Expand Down
168 changes: 85 additions & 83 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,108 +5,110 @@
</head>
<body class="team">

<div id="wrapper">
{% include gtm_body_container.html %}

<header id="header">
<div class="wrapper-holder">
{% include nav.html %}
</div>
{% include content_header.html %}
<div class="sub-nav-wrapper-holder">
<div id="wrapper">

<header id="header">
<div class="wrapper-holder">
{% include subnav.html %}
{% include nav.html %}
</div>
</div>
</header>
{% include content_header.html %}
<div class="sub-nav-wrapper-holder">
<div class="wrapper-holder">
{% include subnav.html %}
</div>
</div>
</header>

<div id="main">
<div class="wrapper-holder">
<section class="container">
<div id="main">
<div class="wrapper-holder">
<section class="container">


<div class="content-container docs">
<div class="content-container docs">

{% include sidebar_nav.html %}
{% include sidebar_nav.html %}

<div style="float: right; width: 700px" class="content">
{% if page.languages %}{% include language-dropdown.html %}{% endif %}<h1>{{ page.title }}</h1> {% if page.summary %}
<p class="subtitle">{{ page.summary }}</p>{% endif %}
{{ content }}
</div>
<div style="float: right; width: 700px" class="content">
{% if page.languages %}{% include language-dropdown.html %}{% endif %}<h1>{{ page.title }}</h1> {% if page.summary %}
<p class="subtitle">{{ page.summary }}</p>{% endif %}
{{ content }}
</div>

</div>
</section>
</div>
</section>
</div>
</div>
</div>
</div>

<!-- footer -->
<footer id="footer">
{% include footer.html %}
<script src="/js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="/js/jquery-ui-1.10.4.min.js" type="text/javascript"></script>
<script src="/js/modernizr.js" type="text/javascript"></script>
<script src="/js/application.js" type="text/javascript"></script>
<script src="/js/custom.js" type="text/javascript"></script>
<script src="/js/search.min.js" type="text/javascript" charset="utf-8"></script>
<!-- footer -->
<footer id="footer">
{% include footer.html %}
<script src="/js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="/js/jquery-ui-1.10.4.min.js" type="text/javascript"></script>
<script src="/js/modernizr.js" type="text/javascript"></script>
<script src="/js/application.js" type="text/javascript"></script>
<script src="/js/custom.js" type="text/javascript"></script>
<script src="/js/search.min.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
$(function() {
$('#search-query').lunrSearch({
indexUrl: '/search.json',
results: '#search-results',
entries: '.entries',
template: '#search-results-template'
<script type="text/javascript">
$(function() {
$('#search-query').lunrSearch({
indexUrl: '/search.json',
results: '#search-results',
entries: '.entries',
template: '#search-results-template'
});
});
});
</script>
</script>

{% raw %}
<script id="search-results-template" type="text/mustache">
{{#entries}}
<article>
<h3>
<a href="{{url}}">{{title}}</a>
</h3>
<p>{{short}}</p>
</article>
{{/entries}}
{% raw %}
<script id="search-results-template" type="text/mustache">
{{#entries}}
<article>
<h3>
<a href="{{url}}">{{title}}</a>
</h3>
<p>{{short}}</p>
</article>
{{/entries}}
</script>
{% endraw %}
</footer>
{% if page.languages %}
<script src="/js/bootstrap-dropdown.js" type="text/javascript"></script>
<script src="/js/language_switcher.js" type="text/javascript"></script>
<script src="/js/purl.js" type="text/javascript"></script>
<script src="/js/cookies.min.js" type="text/javascript"></script>
<script type="text/javascript">
{% assign default_lang = "ruby" %}
var languages = { {% for lang in page.languages %}{% if lang.default %}{% assign default_lang = lang.slug %}{% endif %}
'{{ lang.slug }}': '{{ lang.name }}'{% unless forloop.last %},{% endunless %}{% endfor %}
};
</script>
{% endraw %}
</footer>
{% if page.languages %}
<script src="/js/bootstrap-dropdown.js" type="text/javascript"></script>
<script src="/js/language_switcher.js" type="text/javascript"></script>
<script src="/js/purl.js" type="text/javascript"></script>
<script src="/js/cookies.min.js" type="text/javascript"></script>
<script type="text/javascript">
{% assign default_lang = "ruby" %}
var languages = { {% for lang in page.languages %}{% if lang.default %}{% assign default_lang = lang.slug %}{% endif %}
'{{ lang.slug }}': '{{ lang.name }}'{% unless forloop.last %},{% endunless %}{% endfor %}
};
</script>
<script>
$(document).ready(function() {
if ($.url().param('lang')!=null) {
desiredLanguage = $.url().param('lang');
} else {
if (Cookies.get('desired_language')!=null || localStorage.getItem("desired_language")!=null) {
if (Cookies.get('desired_language')!=null) {
desiredLanguage = Cookies.get('desired_language');
<script>
$(document).ready(function() {
if ($.url().param('lang')!=null) {
desiredLanguage = $.url().param('lang');
} else {
if (Cookies.get('desired_language')!=null || localStorage.getItem("desired_language")!=null) {
if (Cookies.get('desired_language')!=null) {
desiredLanguage = Cookies.get('desired_language');
} else {
desiredLanguage = localStorage.getItem('desired_language');
}
} else {
desiredLanguage = localStorage.getItem('desired_language');
desiredLanguage = "{{ default_lang }}";
}
};
if(!validLanguage(desiredLanguage)) {
switchLanguage("{{ default_lang }}", false);
} else {
desiredLanguage = "{{ default_lang }}";
switchLanguage(desiredLanguage);
}
};
if(!validLanguage(desiredLanguage)) {
switchLanguage("{{ default_lang }}", false);
} else {
switchLanguage(desiredLanguage);
}
});
</script>
{% endif %}
});
</script>
{% endif %}
</body>
</html>
62 changes: 32 additions & 30 deletions _layouts/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
</head>
<body class="team">

{% include gtm_body_container.html %}

<div id="wrapper">

<header id="header">
Expand Down Expand Up @@ -82,39 +84,39 @@ <h3>
{% assign default_lang = "ruby" %}
var languages = { {% for lang in page.languages %}{% if lang.default %}{% assign default_lang = lang.slug %}{% endif %}
'{{ lang.slug }}': '{{ lang.name }}'{% unless forloop.last %},{% endunless %}{% endfor %}
};
</script>
<script>
$(document).ready(function() {
if ($.url().param('lang')!=null) {
desiredLanguage = $.url().param('lang');
} else {
if (Cookies.get('desired_language')!=null || localStorage.getItem("desired_language")!=null) {
if (Cookies.get('desired_language')!=null) {
desiredLanguage = Cookies.get('desired_language');
};
</script>
<script>
$(document).ready(function() {
if ($.url().param('lang')!=null) {
desiredLanguage = $.url().param('lang');
} else {
if (Cookies.get('desired_language')!=null || localStorage.getItem("desired_language")!=null) {
if (Cookies.get('desired_language')!=null) {
desiredLanguage = Cookies.get('desired_language');
} else {
desiredLanguage = localStorage.getItem('desired_language');
}
} else {
desiredLanguage = localStorage.getItem('desired_language');
desiredLanguage = "{{ default_lang }}";
}
};
if(!validLanguage(desiredLanguage)) {
switchLanguage("{{ default_lang }}", false);
} else {
desiredLanguage = "{{ default_lang }}";
switchLanguage(desiredLanguage);
}
};
if(!validLanguage(desiredLanguage)) {
switchLanguage("{{ default_lang }}", false);
} else {
switchLanguage(desiredLanguage);
}
});
</script>
{% endif %}
<script>
window.intercomSettings = {
app_id: "u9ytpaii"
};
</script>
<script>
// We pre-filled your app ID in the widget URL: 'https://widget.intercom.io/widget/u9ytpaii'
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/u9ytpaii';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();
</script>
});
</script>
{% endif %}
<script>
window.intercomSettings = {
app_id: "u9ytpaii"
};
</script>
<script>
// We pre-filled your app ID in the widget URL: 'https://widget.intercom.io/widget/u9ytpaii'
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/u9ytpaii';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();
</script>
</body>
</html>

0 comments on commit 009cbe6

Please sign in to comment.