Skip to content
Permalink
Browse files

Add "cookie blocked" message

  • Loading branch information...
dmarti committed Mar 8, 2019
1 parent 8b5991f commit 1915f0b4025a864a9a762b43e03b963b4bb6fd0e
Showing with 13 additions and 2 deletions.
  1. +9 −2 track.js
  2. +4 −0 track/index.html
@@ -14,9 +14,11 @@
iframeId: 'ALOODO_FAKE_TRACKER_BLOCK_ME'
};
this._var = {
version: '1.0.1',
version: '1.1.0',
event: { load: [],
detected: [] }
detected: [],
blocked: []
}
};
if(options !== undefined) {
this.setOption(options);
@@ -34,6 +36,8 @@
which = 'load';
} else if (ev.data === 'tracking detected') {
which = 'detected';
} else if (ev.data === 'cookie blocked') {
which = 'blocked';
} else {
return;
}
@@ -122,6 +126,9 @@
Aloodo.prototype.onDetected = function(fn) {
return this.on('detected', fn);
};
Aloodo.prototype.onBlocked = function(fn) {
return this.on('blocked', fn);
};

window.Aloodo = Aloodo;

@@ -68,6 +68,10 @@
var newcookie = out.join(' ');
setCookie('site', newcookie);
localStorage.setItem('site', newcookie);
var maybeCookie = getCookie('site');
if (maybeCookie != newcookie) {
parent.postMessage('cookie blocked', '*');
}
}
function doTrack() {

0 comments on commit 1915f0b

Please sign in to comment.
You can’t perform that action at this time.