I am looking for a way to disable the cookies set by Google Analytics. I found some infos in Google's devguides: https://developers.google.com/analytics/devguides/collection/analyticsjs/cookies-user-id#disabling_cookies
Here it says that I should add the following code:
ga('create', 'UA-XXXXXXXXX-X', {
'storage': 'none'
});
But where exactly? I already tried to add it inside the tracking code:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-X"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXXX-X');
ga('create', 'UA-XXXXXXXXX-X', {
'storage': 'none'
});
</script>
I'm grateful for every clue.