Google Adsense Opt-Out
Home
Info

Google Adsense Opt-Out Cookie Javascript

The use of personalized ads requires, according to the EU GDPR (DSGVO), a possibility for a contradiction for the website visitors (natural persons). This possibility for a contradiction can be realized with an opt-out cookie. As a voluntary offer can also, as with Matomo (Piwik) and Analytics, a tracking opt-out are offered. If tracking is not allowed by a website visitor, then no Adsense ads will be displayed. The same applies to the "Do-Not-Track" (DNT) setting in browsers, which is accepted by Adsense.

For a Google Adsense Opt-Out you can use this simple javascripts with a function and set a opt-out cookie for each domain/website as well as each subdomains and subfolders.

Google Adsense accept the Do Not Track (DNT) setings in browsers. But, it is not a good idea to point out to the visitors to realize their contradiction via Do Not Track (DNT), because then the ads are blocked. Google Adsense offers a way to display non-personalized ads on request.

This Google Adsense Opt-Out cookie javascript is independently from Google Adsense Servers and Domains.

There are 3 different JavaScript possibilities available.
  1. Adsense Tracking Optout: Tracking via Google Adsense is prevented, when a cookie is set. With this Opt-Out cookie is the delivery of Adsense ads are prevented (ad blocking, alike DNT).
  2. Adsense direct marketing Optout: Direct marketing (personalization) is prevented and non-personalized ads will be delivery, when a cookie is set or cookies aren't accepted.
  3. Both (1. and 2.) Opt-Out cookie functions are in one JavaScript joined. But the settings (Opt-Out buttons) are separated in two different buttons.
There are two different buttons for the two different Optout offered.
The tracking opt-out button may put into the privacy policy (alike Matomo / Analytics opt-out), and the no direct marketing (non-personalized ads) opt-out must be in a separate webpage according to Article 21 GDPR.
In the 3rd possibility, the codes for the two different buttons for the two different optout work both.

This Google Adsense Opt-Out cookie JavaScripts differentiates between www and non-www Internet Domain Name URLs and differentiates Subdomains.

The security of the possibilities:
At the wish of a website visitor, the cookie may prohibit Google Adsense tracking by saving a cookie. The cookie blocks ads from being displayed, as does a Don Not Track (DNT) setting in the browser.
When using direct marketing (personalized ads), a note on a right to a contradiction must be displayed. If cookies are not allowed by the browser of a website visitor, then personalized ads will not be displayed because the right to contradiction only works with cookies. If no cookies can be stored, then no contradiction is possible, so no personalized ads will be displayed, because then no contradiction is necessary.

Information for GDPR (DSGVO):
In Germany is tracking also allowed with GDPR (DSGVO). Google truncates, according to own information, the IP addresses. An offer of a tracking optout is therefore not a duty, but a voluntary offer. It is different with direct marketing (personalized ads). With direct marketing (personalized ads) two things must be fulfilled according to GDPR (DSGVO).
1.) A "clearly and separated" reference to the right of contradiction of direct marketing.
2.) A function to realize the right to contradict direct marketing.
Some affiliate network operators offer third-party cookies for realizing the contradiction. If the browser of a website visitor blocks third party cookies, the contradiction will not be realized and will violate the GDPR (DSGVO).
As long as the affiliate network operators pass on the obligation to point out and implement the right to contradiction to the publishers, it only helps that each publisher protects himself and at least makes the direct marketing GDPR (DSGVO) accordant on his websites.
The overall situation around direct marketing is not nice because the affiliate network operators like Adsense impose obligations on the publishers that they can not really fulfill. More about the difficult topic in a blog article in German: Affiliate Direktwerbung & DSGVO (personalisierte Anzeigen)

IMPORTANT: When you use direct marketing (personalized ads) via Google Adsense, you must, about the pass on the obligation, publish all companys there are involved, included Google Adsense. By Google Adsense are ~700 companys are involved in direct marketing. You can find a list of all companys and you can select the companys in your Google Adsense account.

1.) Google Adsense Tracking Opt-Out (ads blocking)

Live Example:
Javascript and the storage of cookies must be allowed in your browser.
Please activate JavaScript.
To check the Google Adsense Tracking opt-out cookie, please reload these webpage.
The Google Adsense Tracking Opt-Out Cookie is only valid for this domain and this browser.

You can control and test it with these three buttons.
    Reload Webpage
Please note: In addition, Matomo (Piwik) Tracking Tool is active on this webpage (cookies with "_pk"). Already saved Matomo (Piwik) cookies will not be deleted.

You must insert the marked JavaScript code into your Google Adsense javascript code snippet.
<!-- Google Adsense -->

<ins class="adsbygoogle"
style="display:block"
data-ad-client="
ca-pub-000000000000000
"
data-ad-slot="
000000000
"
data-ad-format="auto"></ins>
<script>
var gadsensedntdomainname = window.location.hostname;
var gadsensedntcookiename = "gadsensedntoptout" + gadsensedntdomainname.replace(/\./g, "");
if (document.cookie.indexOf(gadsensedntcookiename) < 0) {

(adsbygoogle = window.adsbygoogle || []).push({});
var gascript = document.createElement("script");
gascript.async = true;
gascript.src = "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
document.getElementsByTagName("head")[0].appendChild(gascript, document.getElementsByTagName("head")[0]);

</script>
<!-- End Google Adsense -->
Do not forget the closing curly bracket at the bottom of the javascript code.

IMPORTANT: This line must be deleted. So that no JavaScript are loaded by Google Adsense with opt-out cookie and Tracking prevent, please delete this line in the original Google Adsense code version.
<script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>


Button Code for Adsense Tracking Opt-Out Button:
And that is the HTML code snippet with JavaScript to save the Google Adsense Tracking opt-out cookie with click a button for your privacy policy. There is an opt-out cookie check built-in.
Javascript and the storage of cookies must be allowed in your browser.
<div id="gadsensedntoptoutdivid" class="gadsensedntoptoutdivclass"><b>Please activate JavaScript.</b></div>
<script>
var gadsensedntdomainname = window.location.hostname;
var gadsensedntcookiename = "gadsensedntoptout" + gadsensedntdomainname.replace(/\./g, "");
if (document.cookie.indexOf(gadsensedntcookiename) < 0) {
var creategadsensedntoptoutbutton = document.createElement("BUTTON");
var creategadsensedntoptoutbuttontext = document.createTextNode("Save Google Adsense Tracking Opt-Out Cookie");
creategadsensedntoptoutbutton.appendChild(creategadsensedntoptoutbuttontext);
creategadsensedntoptoutbutton.setAttribute("id", "gadsensedntoptoutbuttonid");
creategadsensedntoptoutbutton.setAttribute("class", "gadsensedntoptoutbuttonclass");
document.getElementById("gadsensedntoptoutdivid").innerHTML = "";
document.getElementById("gadsensedntoptoutdivid").appendChild(creategadsensedntoptoutbutton);
creategadsensedntoptoutbutton.onclick = function gadsensedntoptout() {
var gadsensedntcookienamevalue = gadsensedntcookiename + "=" + "optedout;expires=Wed, 1 Jan 2100 00:00:00 UTC;path=/";
document.cookie = gadsensedntcookienamevalue;
}
} else {
document.getElementById("gadsensedntoptoutdivid").innerHTML = "<b>INFO:</b> A Google Adsense Tracking opt-out cookie for this domain and this browser is already exists.";
}
</script>
To check the Google Adsense Tracking opt-out cookie, please reload these webpage.
<br>
The Google Adsense Tracking Opt-Out Cookie is only valid for this domain and this browser.
If you want the opt-out cookie to work separately for individual subfolders, you must change the specification of "path = /".

The opt-out cookie button HTML code snippet with javascript is PHP valid. You can put it in a variable like $gadsensedntoptoutbuttoncode = '...';

You can style the HTML code via CSS. There is a div box and a button with id and class inside.
div id: #gadsensedntoptoutdivid
div class: .gadsensedntoptoutdivclass
button id: #gadsensedntoptoutbuttonid
button class: .gadsensedntoptoutbuttonclass

NOTICE: In addition, a cookie notice must be used because cookies are used: cookie consent

- Do Not Track Cookie is saved = no ads



2.) Google Adsense direct marketing Opt-Out (non personalized ads)

Live Example:
Javascript and the storage of cookies must be allowed in your browser.
Please activate JavaScript.
To check the Google Adsense non personalized ads opt-out cookie, please reload these webpage.
The Google Adsens non personalized ads Opt-Out Cookie is only valid for this domain and this browser.

You can control and test it with these three buttons.
    Reload Webpage
Please note: In addition, Matomo (Piwik) Tracking Tool is active on this webpage (cookies with "_pk"). Already saved Matomo (Piwik) cookies will not be deleted.

You must insert the marked javascript code into your Google Adsense javascript code snippet.
<!-- Google Adsense non personalized ads -->

<ins class="adsbygoogle"
style="display:block"
data-ad-client="
ca-pub-000000000000000
"
data-ad-slot="
000000000
"
data-ad-format="auto"></ins>
<script>
var gadsenseadsdomainname = window.location.hostname;
var gadsenseadscookiecheckname = "gadsensecookiecheck" + gadsenseadsdomainname.replace(/\./g, "");
var gadsenseadscookiechecknamevalue = gadsenseadscookiecheckname + "=" + "checked; expires=Thu, 31 Dec 2113 12:00:00 UTC; path=/";
document.cookie = gadsenseadscookiechecknamevalue;
var adsensecookiecheck = document.cookie.includes(gadsenseadscookiecheckname);
var gadsenseadscookiename = "gadsenseadsoptout" + gadsenseadsdomainname.replace(/\./g, "");
var gadsenseadscookienamecheck = document.cookie.includes(gadsenseadscookiename);
if ((gadsenseadscookienamecheck == false) && (adsensecookiecheck == true)) {

(adsbygoogle = window.adsbygoogle || []).push({});
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=0;
var gascript = document.createElement("script");
gascript.async = true;
gascript.src = "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
document.getElementsByTagName("head")[0].appendChild(gascript, document.getElementsByTagName("head")[0]);
} else if ((gadsenseadscookienamecheck == true) || (adsensecookiecheck == false)) {
(adsbygoogle = window.adsbygoogle || []).push({});
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;
var gascript = document.createElement("script");
gascript.async = true;
gascript.src = "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
document.getElementsByTagName("head")[0].appendChild(gascript, document.getElementsByTagName("head")[0]);

</script>
<!-- End Google Adsense non personalized ads -->
Do not forget the closing curly bracket at the bottom of the javascript code.

IMPORTANT: This line must be deleted. So that no personalized ads are loaded by Google Adsense and no direct marketing is worked with the opt-out cookie, please delete this line in the original Google Adsense code version.
<script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>


And that is the HTML code snippet with javascript to save the Google Adsense non personalized ads opt-out cookie with click a button for your direct marketing contradiction info website. There is an opt-out cookie check built-in.
Button Code for Adsense direct marketing (personalized ads) Opt-Out Button:
Javascript and the storage of cookies must be allowed in your browser.
<div id="gadsenseadsoptoutdivid" class="gadsenseadsoptoutdivclass"><b>Please activate JavaScript.</b></div>
<script>
var gadsenseadsdomainname = window.location.hostname;
var gadsenseadscookiename = "gadsenseadsoptout" + gadsenseadsdomainname.replace(/\./g, "");
if (document.cookie.indexOf(gadsenseadscookiename) < 0) {
var creategadsenseadsoptoutbutton = document.createElement("BUTTON");
var creategadsenseadsoptoutbuttontext = document.createTextNode("Save Google Adsense non personalized Opt-Out Cookie");
creategadsenseadsoptoutbutton.appendChild(creategadsenseadsoptoutbuttontext);
creategadsenseadsoptoutbutton.setAttribute("id", "gadsenseadsoptoutbuttonid");
creategadsenseadsoptoutbutton.setAttribute("class", "gadsenseadsoptoutbuttonclass");
document.getElementById("gadsenseadsoptoutdivid").innerHTML = "";
document.getElementById("gadsenseadsoptoutdivid").appendChild(creategadsenseadsoptoutbutton);
creategadsenseadsoptoutbutton.onclick = function gadsenseadsoptout() {
var gadsenseadscookienamevalue = gadsenseadscookiename + "=" + "optedout;expires=Wed, 1 Jan 2100 00:00:00 UTC;path=/";
document.cookie = gadsenseadscookienamevalue;
}
} else {
document.getElementById("gadsenseadsoptoutdivid").innerHTML = "<b>INFO:</b> A Google Adsense non personalized opt-out cookie for this domain and this browser is already exists.";
}
</script>
To check the Google Adsense non personalized opt-out cookie, please reload these webpage.
<br>
The Google Adsense non personalized Opt-Out Cookie is only valid for this domain and this browser.
If you want the opt-out cookie to work separately for individual subfolders, you must change the specification of "path = /".

The opt-out cookie button HTML code snippet with javascript is PHP valid. You can put it in a variable like $gadsenseadsoptoutbuttoncode = '...';

You can style the HTML code via CSS. There is a div box and a button with id and class inside.
div id: #gadsenseadsoptoutdivid
div class: .gadsenseadsoptoutdivclass
button id: #gadsenseadsoptoutbuttonid
button class: .gadsenseadsoptoutbuttonclass

NOTICE: The GDPR (DSGVO) provides that when using direct marketing website visitors must be explicitly pointed to the contradiction (opt-out). This must be realized according to GDPR (DSGVO) clearly and separately from the cookie note. (GDPR Art. 21). This may be realized with a second cookie note.

NOTICE: In addition, a cookie notice must be used because cookies are used: cookie consent

TEST IT & CHECK IT: You can test and check the function in your browser. When the cookie for non-personalized ads is activ/saved, a value is set in the Adsense URL querystring with "npa=1". You find this Adsense URL querystring via the Browsers Inspector - Networkanalysis (Firefox) or Developer Tools - Network (Chrome). The URL begins with the querystring "ads?client". Without the "npa=1" in the Adsense URL querystring then personalized ads are loading. This does not apply if Personalized Ads have been disabled in your Adsense Account.

- Browser don't accept cookies = non-personalized ads
- Non-personalized ads Optout Cookie is saved = non-personalized ads



3.) Google Adsense Tracking & direct marketing Opt-Out

You must insert the marked javascript code into your Google Adsense javascript code snippet.
<!-- Google Adsense -->

<ins class="adsbygoogle"
style="display:block"
data-ad-client="
ca-pub-000000000000000
"
data-ad-slot="
000000000
"
data-ad-format="auto"></ins>
<script>
var gadsensedomainname = window.location.hostname;
var gadsenseadscookiecheckname = "gadsensecookiecheck" + gadsensedomainname.replace(/\./g, "");
var gadsenseadscookiechecknamevalue = gadsenseadscookiecheckname + "=" + "checked; expires=Thu, 31 Dec 2113 12:00:00 UTC; path=/";
document.cookie = gadsenseadscookiechecknamevalue;
var adsensecookiecheck = document.cookie.includes(gadsenseadscookiecheckname);
var gadsenseadscookiename = "gadsenseadsoptout" + gadsensedomainname.replace(/\./g, "");
var gadsenseadscookienamecheck = document.cookie.includes(gadsenseadscookiename);
var gadsensedntcookiename = "gadsensedntoptout" + gadsensedomainname.replace(/\./g, "");
var gadsensedntcookienamecheck = document.cookie.includes(gadsensedntcookiename);
if (gadsensedntcookienamecheck == false) {
if ((gadsenseadscookienamecheck == false) && (adsensecookiecheck == true)) {

(adsbygoogle = window.adsbygoogle || []).push({});
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=0;
var gascript = document.createElement("script");
gascript.async = true;
gascript.src = "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
document.getElementsByTagName("head")[0].appendChild(gascript, document.getElementsByTagName("head")[0]);
} else if ((gadsenseadscookienamecheck == true) || (adsensecookiecheck == false)) {
(adsbygoogle = window.adsbygoogle || []).push({});
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;
var gascript = document.createElement("script");
gascript.async = true;
gascript.src = "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
document.getElementsByTagName("head")[0].appendChild(gascript, document.getElementsByTagName("head")[0]);


</script>
<!-- End Google Adsense -->
Do not forget the closing curly bracket at the bottom of the javascript code.

IMPORTANT: This line must be deleted. So that no personalized ads are loaded by Google Adsense and no direct marketing is worked with the opt-out cookie, please delete this line in the original Google Adsense code version.
<script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>


Button Code for Adsense direct marketing (personalized ads) Opt-Out Button:
And that is the HTML code snippet with javascript to save the Google Adsense non personalized ads opt-out cookie with click a button for your direct marketing contradiction info website. There is an opt-out cookie check built-in.
Javascript and the storage of cookies must be allowed in your browser.
<div id="gadsenseadsoptoutdivid" class="gadsenseadsoptoutdivclass"><b>Please activate JavaScript.</b></div>
<script>
var gadsenseadsdomainname = window.location.hostname;
var gadsenseadscookiename = "gadsenseadsoptout" + gadsenseadsdomainname.replace(/\./g, "");
if (document.cookie.indexOf(gadsenseadscookiename) < 0) {
var creategadsenseadsoptoutbutton = document.createElement("BUTTON");
var creategadsenseadsoptoutbuttontext = document.createTextNode("Save Google Adsense non personalized Opt-Out Cookie");
creategadsenseadsoptoutbutton.appendChild(creategadsenseadsoptoutbuttontext);
creategadsenseadsoptoutbutton.setAttribute("id", "gadsenseadsoptoutbuttonid");
creategadsenseadsoptoutbutton.setAttribute("class", "gadsenseadsoptoutbuttonclass");
document.getElementById("gadsenseadsoptoutdivid").innerHTML = "";
document.getElementById("gadsenseadsoptoutdivid").appendChild(creategadsenseadsoptoutbutton);
creategadsenseadsoptoutbutton.onclick = function gadsenseadsoptout() {
var gadsenseadscookienamevalue = gadsenseadscookiename + "=" + "optedout;expires=Wed, 1 Jan 2100 00:00:00 UTC;path=/";
document.cookie = gadsenseadscookienamevalue;
}
} else {
document.getElementById("gadsenseadsoptoutdivid").innerHTML = "<b>INFO:</b> A Google Adsense non personalized opt-out cookie for this domain and this browser is already exists.";
}
</script>
To check the Google Adsense non personalized opt-out cookie, please reload these webpage.
<br>
The Google Adsense non personalized Opt-Out Cookie is only valid for this domain and this browser.
If you want the opt-out cookie to work separately for individual subfolders, you must change the specification of "path = /".

The opt-out cookie button HTML code snippet with javascript is PHP valid. You can put it in a variable like $gadsenseadsoptoutbuttoncode = '...';

You can style the HTML code via CSS. There is a div box and a button with id and class inside.
div id: #gadsenseadsoptoutdivid
div class: .gadsenseadsoptoutdivclass
button id: #gadsenseadsoptoutbuttonid
button class: .gadsenseadsoptoutbuttonclass


Button Code for Adsense Tracking Opt-Out Button:
And that is the HTML code snippet with JavaScript to save the Google Adsense Tracking opt-out cookie with click a button for your privacy policy. There is an opt-out cookie check built-in.
Javascript and the storage of cookies must be allowed in your browser.
<div id="gadsensedntoptoutdivid" class="gadsensedntoptoutdivclass"><b>Please activate JavaScript.</b></div>
<script>
var gadsensedntdomainname = window.location.hostname;
var gadsensedntcookiename = "gadsensedntoptout" + gadsensedntdomainname.replace(/\./g, "");
if (document.cookie.indexOf(gadsensedntcookiename) < 0) {
var creategadsensedntoptoutbutton = document.createElement("BUTTON");
var creategadsensedntoptoutbuttontext = document.createTextNode("Save Google Adsense Tracking Opt-Out Cookie");
creategadsensedntoptoutbutton.appendChild(creategadsensedntoptoutbuttontext);
creategadsensedntoptoutbutton.setAttribute("id", "gadsensedntoptoutbuttonid");
creategadsensedntoptoutbutton.setAttribute("class", "gadsensedntoptoutbuttonclass");
document.getElementById("gadsensedntoptoutdivid").innerHTML = "";
document.getElementById("gadsensedntoptoutdivid").appendChild(creategadsensedntoptoutbutton);
creategadsensedntoptoutbutton.onclick = function gadsensedntoptout() {
var gadsensedntcookienamevalue = gadsensedntcookiename + "=" + "optedout;expires=Wed, 1 Jan 2100 00:00:00 UTC;path=/";
document.cookie = gadsensedntcookienamevalue;
}
} else {
document.getElementById("gadsensedntoptoutdivid").innerHTML = "<b>INFO:</b> A Google Adsense Tracking opt-out cookie for this domain and this browser is already exists.";
}
</script>
To check the Google Adsense Tracking opt-out cookie, please reload these webpage.
<br>
The Google Adsense Tracking Opt-Out Cookie is only valid for this domain and this browser.
If you want the opt-out cookie to work separately for individual subfolders, you must change the specification of "path = /".

The opt-out cookie button HTML code snippet with javascript is PHP valid. You can put it in a variable like $gadsensedntoptoutbuttoncode = '...';

You can style the HTML code via CSS. There is a div box and a button with id and class inside.
div id: #gadsensedntoptoutdivid
div class: .gadsensedntoptoutdivclass
button id: #gadsensedntoptoutbuttonid
button class: .gadsensedntoptoutbuttonclass

NOTICE: The GDPR (DSGVO) provides that when using direct marketing website visitors must be explicitly pointed to the contradiction (opt-out). This must be realized according to GDPR (DSGVO) clearly and separately from the cookie note. (GDPR Art. 21). This may be realized with a second cookie note.

NOTICE: In addition, a cookie notice must be used because cookies are used: cookie consent

TEST IT & CHECK IT: You can test and check the function in your browser. When the cookie for non-personalized ads is activ/saved, a value is set in the Adsense URL querystring with "npa=1". You find this Adsense URL querystring via the Browsers Inspector - Networkanalysis (Firefox) or Developer Tools - Network (Chrome). The URL begins with the querystring "ads?client". Without the "npa=1" in the Adsense URL querystring then personalized ads are loading. This does not apply if Personalized Ads have been disabled in your Adsense Account.

- Browser don't accept cookies = non-personalized ads
- Non-personalized ads Optout Cookie is saved = non-personalized ads
- Do Not Track Cookie is saved = no ads



4.) Note on the right of contradiction of direct marketing

The GDPR (DSGVO) provides, that when using direct marketing, then website visitors must be explicitly pointed to the contradiction (opt-out). This must be realized according to GDPR (DSGVO) clearly and separately from the cookie note. (GDPR Art. 21). This may be realized with a second cookie note.

Code for a Note on the right of contradiction of direct marketing
<div id="eudsgvonotedirectmarketing" style="position:fixed !important;bottom:1px !important;left:1px !important;padding:5px !important;text-align:center !important;background-color:#ffffff !important;opacity:0.9 !important;color:#000000 !important;font-family:Helvetica,Arial,Geneva,sans-serif !important;font-size:0.8em !important;z-index:1000 !important;border-style:dashed !important;border-color:#ff0000 !important;border-width:5px !important;border-radius:10px !important;">
<!-- Direct marketing note text -->
Direct marketing in use.
<br>
<!-- Right of contradiction note text -->
<a href="https://www.example.com/privacy-policy.html" style="font-family:helvetica !important;font-weight:bold !important;font-size:1em !important;color:#888888 !important;">
<!-- Right of contradiction note link -->
Right of contradiction
</a>
<button type="button" onclick="eudsgvorightofcontra()" title="close" style="background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIhSURBVDjLlZPrThNRFIWJicmJz6BWiYbIkYDEG0JbBiitDQgm0PuFXqSAtKXtpE2hNuoPTXwSnwtExd6w0pl2OtPlrphKLSXhx07OZM769qy19wwAGLhM1ddC184+d18QMzoq3lfsD3LZ7Y3XbE5DL6Atzuyilc5Ciyd7IHVfgNcDYTQ2tvDr5crn6uLSvX+Av2Lk36FFpSVENDe3OxDZu8apO5rROJDLo30+Nlvj5RnTlVNAKs1aCVFr7b4BPn6Cls21AWgEQlz2+Dl1h7IdA+i97A/geP65WhbmrnZZ0GIJpr6OqZqYAd5/gJpKox4Mg7pD2YoC2b0/54rJQuJZdm6Izcgma4TW1WZ0h+y8BfbyJMwBmSxkjw+VObNanp5h/adwGhaTXF4NWbLj9gEONyCmUZmd10pGgf1/vwcgOT3tUQE0DdicwIod2EmSbwsKE1P8QoDkcHPJ5YESjgBJkYQpIEZ2KEB51Y6y3ojvY+P8XEDN7uKS0w0ltA7QGCWHCxSWWpwyaCeLy0BkA7UXyyg8fIzDoWHeBaDN4tQdSvAVdU1Aok+nsNTipIEVnkywo/FHatVkBoIhnFisOBoZxcGtQd4B0GYJNZsDSiAEadUBCkstPtN3Avs2Msa+Dt9XfxoFSNYF/Bh9gP0bOqHLAm2WUF1YQskwrVFYPWkf3h1iXwbvqGfFPSGW9Eah8HSS9fuZDnS32f71m8KFY7xs/QZyu6TH2+2+FAAAAABJRU5ErkJggg==) !important;background-position:center !important;background-repeat:no-repeat !important;width:20px !important;height:20px !important;position:absolute !important;top:-6px !important;right:-6px !important;padding:10px !important;border-radius:10px !important;border-style:outset !important;background:#eeeeee;cursor:pointer !important;">
</button>
</div>

<script>
var eudsgvodirectmarketingdomainname = window.location.hostname;
var eudsgvodirectmarketingcookiename = "eudsgvodirectmarketingcookie" + eudsgvodirectmarketingdomainname.replace(/\./g, "");
var gadsensenotedomainname = window.location.hostname;
var gadsenseadsnotecookiecheckname = "gadsensecookiecheck" + gadsensenotedomainname.replace(/\./g, "");
var gadsenseadsnotecookiechecknamevalue = gadsenseadsnotecookiecheckname + "=" + "checked; expires=Thu, 31 Dec 2113 12:00:00 UTC; path=/";
document.cookie = gadsenseadsnotecookiechecknamevalue;
var adsensenotecookiecheck = document.cookie.includes(gadsenseadsnotecookiecheckname);
var gadsenseadsnotecookiename = "gadsenseadsoptout" + gadsensenotedomainname.replace(/\./g, "");
var gadsenseadsnotecookienamecheck = document.cookie.includes(gadsenseadsnotecookiename);
var gadsensedntnotecookiename = "gadsensedntoptout" + gadsensenotedomainname.replace(/\./g, "");
var gadsensedntnotecookienamecheck = document.cookie.includes(gadsensedntnotecookiename);
if ((gadsensedntnotecookienamecheck == true) || (gadsenseadsnotecookienamecheck == true) || (adsensenotecookiecheck == false)) {
document.getElementById("eudsgvonotedirectmarketing").style.display = "none";
}
if (document.cookie.indexOf(eudsgvodirectmarketingcookiename) >= 0) {
document.getElementById("eudsgvonotedirectmarketing").style.display = "none";
}

function eudsgvorightofcontra() {
var eudsgvodirectmarketingcookienamevalue = eudsgvodirectmarketingcookiename + "=" + "accepted;path=/";
document.cookie = eudsgvodirectmarketingcookienamevalue;
document.getElementById("eudsgvonotedirectmarketing").style.display = "none";
}
</script>

NOTE: The note on the right of contradiction of direct marketing is only displayed when:
- cookies are accepted in the browser.
- no tracking optout cookie is found.
- no direct marketing optout cookie is found.
- no "close the note" cookie is found.

TEST IT & CHECK IT: You can test and check the function in your browser. The note for direct marketing is only displayed, when personalized ads are loading.

- Browser don't accept cookies = no note
- Non-personalized ads Optout Cookie is saved = no note
- Do Not Track Cookie is saved = no note
- The note is closed (implicid Optin cookie is saved) = no note

NOTICE: In addition, a cookie notice must be used because cookies are used: cookie consent


Earn more money with your website!

Support Penultima.de
PayPal Gefällt Mir Button
© Penultima.de - All rights reserved. Data protection statement & Imprint & Contact
Cookies in use.
More Infos