File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 456456 function sendRequest ( request , delay ) {
457457 var now = new Date ( ) ;
458458
459- if ( ! ( configDoNotTrack || ! ! getSnowplowCookieValue ( configOptOutCookie ) ) ) {
459+ // Set to true if Opt-out cookie is defined
460+ var toOptoutByCookie = ! ! cookie . cookie ( configOptOutCookie ) ;
461+
462+ if ( ! ( configDoNotTrack || toOptoutByCookie ) ) {
460463 outQueueManager . enqueueRequest ( request . build ( ) , configCollectorUrl ) ;
461464 mutSnowplowState . expireDateTime = now . getTime ( ) + delay ;
462465 }
705708 lastVisitTs = id [ 5 ] ,
706709 sessionIdFromCookie = id [ 6 ] ;
707710
708- if ( ( configDoNotTrack || ! ! getSnowplowCookieValue ( configOptOutCookie ) ) &&
711+ var toOptoutByCookie = ! ! cookie . cookie ( configOptOutCookie ) ;
712+
713+ if ( ( configDoNotTrack || toOptoutByCookie ) &&
709714 configStateStorageStrategy != 'none' ) {
710715 if ( configStateStorageStrategy == 'localStorage' ) {
711716 helpers . attemptWriteLocalStorage ( idname , '' ) ;
19291934 */
19301935 setOptOutCookie : function ( name ) {
19311936 configOptOutCookie = name ;
1932- setCookie ( name , '*' , 1800 ) ;
19331937 } ,
19341938
19351939 /**
You can’t perform that action at this time.
0 commit comments