diff --git a/scripts/update-tracker.js b/scripts/update-tracker.js index 736dc2efbc..4dcbf24572 100644 --- a/scripts/update-tracker.js +++ b/scripts/update-tracker.js @@ -6,7 +6,7 @@ const path = require('path'); const endPoint = process.env.COLLECT_API_ENDPOINT; if (endPoint) { - const file = path.resolve(__dirname, '../public/tracker.js'); + const file = path.resolve(__dirname, '../public/script.js'); const tracker = fs.readFileSync(file); diff --git a/src/tracker/index.js b/src/tracker/index.js index e0c036894d..c17a76e8df 100644 --- a/src/tracker/index.js +++ b/src/tracker/index.js @@ -54,7 +54,7 @@ const parseURL = url => { try { // use location.origin as the base to handle cases where the url is a relative path - const { pathname, search, hash } = new URL(url, location.origin); + const { pathname, search, hash } = new URL(url, origin); url = pathname + search + hash; } catch (e) { /* empty */