Skip to content

Commit

Permalink
hot fix - GDPR
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeriiVasyliev committed Jan 28, 2025
1 parent 6511334 commit 8c9311d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions _includes/cookie-consent.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
#cookie-notice a {position: relative; bottom: 4px;}
}
</style>
<div id="cookie-notice"><span>We would like to use third party cookies and scripts to improve the functionality of this website.</span><a id="cookie-notice-accept" class="btn btn-primary btn-sm">Approve</a><a href="/privacy" class="btn btn-primary btn-sm">More info</a></div>
<div id="cookie-notice"><span>We would like to use third party cookies and scripts to improve the functionality of this website.</span><a id="cookie-notice-accept" class="btn btn-primary btn-sm">Approve</a><a href="{{ site.baseurl }}/policies/cookies-notice/" class="btn btn-primary btn-sm">More info</a></div>

<!-- See related Analytics code in the include of ga.js in <script> tag below -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ZNJ2DS1LNM"></script>

<script>
function createCookie(name,value,days) {
var expires = "";
Expand All @@ -33,12 +37,11 @@

if(readCookie('cookie-notice-dismissed')=='true') {
{% include ga.js %}
{% include chatbutton.js %}
} else {
document.getElementById('cookie-notice').style.display = 'block';
}
document.getElementById('cookie-notice-accept').addEventListener("click",function() {
createCookie('cookie-notice-dismissed','true',31);
document.getElementById('cookie-notice-accept').addEventListener("click", function () {
createCookie('cookie-notice-dismissed', 'true', 31);
document.getElementById('cookie-notice').style.display = 'none';
location.reload();
});
Expand Down
4 changes: 4 additions & 0 deletions _includes/ga.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-ZNJ2DS1LNM');

0 comments on commit 8c9311d

Please sign in to comment.