Skip to content

Commit

Permalink
Merge pull request #193 from gradle/cookie-consent-update
Browse files Browse the repository at this point in the history
Unify the cookie consent engine for the site
  • Loading branch information
oleg-nenashev authored Jan 7, 2025
2 parents 199fbb3 + 5760e06 commit 512f1f4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 34 deletions.
15 changes: 0 additions & 15 deletions docs/assets/js/google-tag-support.js

This file was deleted.

2 changes: 0 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ theme:

extra_css:
- assets/css/gradle.css
extra_javascript:
- assets/js/google-tag-support.js

extra:
social:
Expand Down
6 changes: 2 additions & 4 deletions overrides/books.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "main.html" %}

{% block content %}
{{ super() }}
Expand All @@ -24,6 +24,4 @@ <h5>
</div>
{% endfor %}
</div>


{% endblock %}
{% endblock %}
10 changes: 6 additions & 4 deletions overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@

{% block scripts %}
{{ super() }}
{% endblock %}

{% block footer %}
<!-- Cookie Consent -->
<div id="analytics-consent-div"></div>

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WRTQKGT"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{{ super() }}
{% endblock %}
10 changes: 4 additions & 6 deletions overrides/partials/integrations/analytics/custom.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<!-- 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-WRTQKGT');
</script>
<link rel="stylesheet" href="https://gradle.org/lib/cookie-consent-banner.css">
<script id="bt-google-tag-manager-injector" src="https://gradle.org/js/google-tag-analytics.js"
consentHolderLocator="#analytics-consent-div"
promo_location="community-site">
<!-- End Google Tag Manager -->
4 changes: 1 addition & 3 deletions overrides/resources.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "main.html" %}

{% block content %}
{{ super() }}
Expand All @@ -23,6 +23,4 @@ <h3>
</div>
{% endfor %}
</div>


{% endblock %}

0 comments on commit 512f1f4

Please sign in to comment.