Hi,
thanks for your reply. I mostly use RW to preview at this stage, as there is really nothing on the page yet. Following your post, I did try Safari, but it really behaves the same way, i.e. as soon as the code is copied in, it stops working. Take out the code and the rest will be back instantly. After fiddling around with it some more, it seems to the Cookie Jar might be very sensitive to syntax (which, unfortunately, I know nothing about).
Adding something as simple as
alert("Test This");
in the ‘Other Code’ section (hope I did that right this time), seems to work as long as there’s no other (faulty) code in there or the ‘Analytics Code’ box.
I then added the Google code to the ‘Analytics Code’ section. After stripping out the script tags, it looks like this:
var gaProperty = 'UA-92012714-1';
var disableStr = 'ga-disable-' + gaProperty;
if (document.cookie.indexOf(disableStr + '=true') > -1) {
window[disableStr] = true;
}
function gaOptout() {
document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[disableStr] = true;
alert('Das Tracking durch Google Analytics wurde in Ihrem Browser für diese Website deaktiviert.');
}
async src="https://www.googletagmanager.com/gtag/js?id=UA-92012714-1"
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-92012714-1', { 'anonymize_ip': true });
Before it looked like this:
<script>
var gaProperty = 'UA-92012714-1';
var disableStr = 'ga-disable-' + gaProperty;
if (document.cookie.indexOf(disableStr + '=true') > -1) {
window[disableStr] = true;
}
function gaOptout() {
document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[disableStr] = true;
alert('Das Tracking durch Google Analytics wurde in Ihrem Browser für diese Website deaktiviert.');
}
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-92012714-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-92012714-1', { 'anonymize_ip': true });
</script>
However, once any of these versions are in the ‘Analytics Code’ box, the stack disappears completely in either RW preview or Safari preview. Take the code out and it will be back.
Oh, and the link is: www.eat-drink-cook.com/testv3/index.html
Many thanks, Matthias