Skip to content

Commit

Permalink
Merge pull request #344 from canonical/gtm-cookie
Browse files Browse the repository at this point in the history
Invoke cookie policy before gtm
  • Loading branch information
britneywwc authored Oct 15, 2024
2 parents 601a4bb + 8380d00 commit ff35a32
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions templates/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<link rel="manifest" href="{{ versioned_static("files/site.webmanifest") }}" />
<!-- Serving favicon for search engines locally -->
<link rel="icon" type="image/png" sizes="48x48" href="{{ versioned_static("favicons/COF-favicon-48x48.png") }}" />
<!-- Cookie policy -->
<script src="{{ versioned_static('js/modules/cookie-policy.js')}}"></script>
<script>cpNs.cookiePolicy();</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],
Expand All @@ -49,11 +52,9 @@
</div>
{% include "_layouts/_footer.html" %}
{% endblock body %}
<script src="{{ versioned_static('js/modules/global-nav.js') }}"></script>
<script src="{{ versioned_static('js/modules/cookie-policy.js')}}"></script>
<script src="{{ versioned_static('js/modules/global-nav.js') }}"></script>
<script src="{{ versioned_static('js/tabs.js') }}"></script>
<script>
cpNs.cookiePolicy();
<script>
if (typeof canonicalGlobalNav !== "undefined") {
canonicalGlobalNav.createNav({breakpoint: 1035});
}
Expand Down

0 comments on commit ff35a32

Please sign in to comment.