mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
Updated tracker script name and endpoint.
This commit is contained in:
parent
be8eb61f7f
commit
54051d7204
@ -6,12 +6,12 @@ import { terser } from 'rollup-plugin-terser';
|
|||||||
export default {
|
export default {
|
||||||
input: 'tracker/index.js',
|
input: 'tracker/index.js',
|
||||||
output: {
|
output: {
|
||||||
file: 'public/umami.js',
|
file: 'public/script.js',
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
replace({
|
replace({
|
||||||
'/api/collect': process.env.COLLECT_API_ENDPOINT || '/api/collect',
|
'/api/send': process.env.COLLECT_API_ENDPOINT || '/api/send',
|
||||||
delimiters: ['', ''],
|
delimiters: ['', ''],
|
||||||
preventAssignment: true,
|
preventAssignment: true,
|
||||||
}),
|
}),
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
const root = hostUrl
|
const root = hostUrl
|
||||||
? hostUrl.replace(/\/$/, '')
|
? hostUrl.replace(/\/$/, '')
|
||||||
: currentScript.src.split('/').slice(0, -1).join('/');
|
: currentScript.src.split('/').slice(0, -1).join('/');
|
||||||
const endpoint = `${root}/api/collect`;
|
const endpoint = `${root}/api/send`;
|
||||||
const screen = `${width}x${height}`;
|
const screen = `${width}x${height}`;
|
||||||
const eventClass = /^umami--([a-z]+)--([\w]+[\w-]*)$/;
|
const eventClass = /^umami--([a-z]+)--([\w]+[\w-]*)$/;
|
||||||
const eventSelect = "[class*='umami--']";
|
const eventSelect = "[class*='umami--']";
|
||||||
|
Loading…
Reference in New Issue
Block a user