From 54051d7204c086367189bf271e0682c87e930a81 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 15 Mar 2023 16:27:05 -0700 Subject: [PATCH] Updated tracker script name and endpoint. --- rollup.tracker.config.js | 4 ++-- tracker/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rollup.tracker.config.js b/rollup.tracker.config.js index 5bc09610..f4e7223c 100644 --- a/rollup.tracker.config.js +++ b/rollup.tracker.config.js @@ -6,12 +6,12 @@ import { terser } from 'rollup-plugin-terser'; export default { input: 'tracker/index.js', output: { - file: 'public/umami.js', + file: 'public/script.js', format: 'iife', }, plugins: [ replace({ - '/api/collect': process.env.COLLECT_API_ENDPOINT || '/api/collect', + '/api/send': process.env.COLLECT_API_ENDPOINT || '/api/send', delimiters: ['', ''], preventAssignment: true, }), diff --git a/tracker/index.js b/tracker/index.js index baff16ec..8f27ab36 100644 --- a/tracker/index.js +++ b/tracker/index.js @@ -61,7 +61,7 @@ const root = hostUrl ? hostUrl.replace(/\/$/, '') : currentScript.src.split('/').slice(0, -1).join('/'); - const endpoint = `${root}/api/collect`; + const endpoint = `${root}/api/send`; const screen = `${width}x${height}`; const eventClass = /^umami--([a-z]+)--([\w]+[\w-]*)$/; const eventSelect = "[class*='umami--']";