set domain of cookie to be the domain of the google analytics cookie which is .<domain> or .lbry.io in this case.

This commit is contained in:
Mark Beamer Jr 2019-01-19 20:38:37 -05:00
parent 474a88de76
commit 78757bd0ed
No known key found for this signature in database
GPG key ID: 1C314FB89AD76973

View file

@ -14,7 +14,7 @@
ga(function(tracker) {
let date = new Date();
date.setTime(date.getTime() + (30 * 24 * 60 * 60 * 1000));
document.cookie = 'ga_cid=' + tracker.get('clientId') + '; expires=' + date.toUTCString() + '; path=/';
document.cookie = 'ga_cid=' + tracker.get('clientId') + '; expires=' + date.toUTCString() + '; path=/' + '; domain=' + tracker.get('cookieDomain');
});
!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');