Fix old script

pull/1073/head
Uku Taht 6 years ago
parent f203eba7c0
commit ff9f95ea18

@ -2,9 +2,11 @@
// with some early customers. This script uses a cookie but this was an old version of Plausible.
// Current script can be found in the tracker/src/plausible.js file
(function(window, plausibleHost){
(function(){
'use strict';
var plausibleHost = new URL(scriptEl.src).origin
function setCookie(name,value) {
var date = new Date();
date.setTime(date.getTime() + (3*365*24*60*60*1000)); // 3 YEARS
@ -117,4 +119,4 @@
} catch (e) {
new Image().src = plausibleHost + '/api/error?message=' + encodeURIComponent(e.message);
}
})(window, '<%= base_url %>');
})();

Loading…
Cancel
Save