//Facebook Pixel Part
if (parms.facebookpixelid) {
var fpProperty = 'mde-service';
var fpdisableStr = 'fp-disable-' + fpProperty;
// Opt-out function
function deactivatePixelDSGVOAIO() {
document.cookie = fpdisableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[fpdisableStr] = true;
alert("Facebook Pixel wurde aktiviert. Die Seite wird nun neu geladen um die Änderungen wirksam zu machen." );
location.reload();
}
function activatePixelDSGVOAIO() {
document.cookie = fpdisableStr+'=true; Max-Age=-99999999;path=/';
window[fpdisableStr] = false;
alert("Facebook Pixel wurde aktiviert. Die Seite wird nun neu geladen um die Änderungen wirksam zu machen.");
location.reload();
}
if (document.cookie.indexOf(fpdisableStr + '=true') > -1) {
// FB-Pixel ist deaktiviert durch Nutzer, nichts tun
console.log("Facebook Pixel ist deaktiviert. Datenschutz-Mechanismus für Wordpress (DSGVO All in one for WP) von https://wordpress.org/plugins/dsgvo-all-in-one-for-wp/");
}else {
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', parms.facebookpixelid);//Hier Ihre ID einsetzen
fbq('track', 'PageView');
console.log("Facebook Pixel ist aktiviert. Datenschutz-Mechanismus für Wordpress (DSGVO All in one for WP) von https://wordpress.org/plugins/dsgvo-all-in-one-for-wp/");
}
}
//Display
jQuery(document).ready(function($) {
if (parms.facebookpixelid) {
if (document.cookie.indexOf(fpdisableStr + '=true') > -1) {
$('
').appendTo('#dsgvoFPoptout');
$('Derzeit deaktiviert ❎
').appendTo('#dsgvoFBstatus');
}else {
$('').appendTo('#dsgvoFPoptout');
$('Derzeit aktiviert ✅
').appendTo('#dsgvoFBstatus');
}
} else {
$('.fbtitle').hide();
}
});
//Google Analytics Part
if (parms.googleid) {
// Set to the same value as the web property used on the site
var gaProperty = parms.googleid;
// Disable tracking if the opt-out cookie exists.
var disableStr = 'ga-disable-' + gaProperty;
if (document.cookie.indexOf(disableStr + '=true') > -1) {
window[disableStr] = true;
}
// Opt-out function
function deactivateAnalyticsDSGVOAIO() {
document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[disableStr] = true;
alert(document.cookie.indexOf(disableStr + '=true'));
alert("Das Tracking durch Google Analytics wurde in Ihrem Browser für diese Website deaktiviert. Die Seite wird nun neu geladen um die Änderungen wirksam zu machen." );
location.reload();
}
function activateAnalyticsDSGVOAIO() {
document.cookie = disableStr + '=true; Max-Age=-99999999;path=/';
window[disableStr] = true;
alert("Das Tracking durch Google Analytics wurde in Ihrem Browser für diese Website aktiviert. Die Seite wird nun neu geladen um die Änderungen wirksam zu machen." );
location.reload();
}
}
//Display dsgvoGAstatus
jQuery(document).ready(function($) {
if (parms.googleid) {
if (document.cookie.indexOf(disableStr + '=true') > -1) {
$('').appendTo('#dsgvoGAoptout');
$('Derzeit deaktiviert ❎
').appendTo('#dsgvoGAstatus');
}else {
$('').appendTo('#dsgvoGAoptout');
$('Derzeit aktiviert ✅
').appendTo('#dsgvoGAstatus');
}
} else {
$('.gatitle').hide();
}
});
//export data via pdf
jQuery(document).ready(function() {
jQuery("#export_use_data_pdf").on("click", function(){
var win = window.open('http://easyshopping.li/dev/wp-content/plugins/dsgvo-all-in-one-for-wp/create_pdf.php?usrid='+parms.usrid, '_blank');
if (win) {
//Browser has allowed it to be opened
win.focus();
} else {
//Browser has blocked it
alert('Please allow popups for this website');
}
alert("click");
});
});