Merge branch 'analytics' of https://github.com/umami-software/umami into dev

This commit is contained in:
Francis Cao 2024-10-17 09:53:20 -07:00
commit 9a5d18f38b
2 changed files with 6 additions and 2 deletions

View File

@ -61,7 +61,7 @@ if (trackerScriptName) {
names.forEach(name => {
rewrites.push({
source: `/${name.replace(/^\/+/, '')}`,
destination: '/script.js',
destination: '/tracker.js',
});
});
}
@ -163,6 +163,10 @@ const config = {
async rewrites() {
return [
...rewrites,
{
source: '/script.js',
destination: 'https://tracker-script.umami.dev/',
},
{
source: '/telemetry.js',
destination: '/api/scripts/telemetry',

View File

@ -5,7 +5,7 @@ import { terser } from 'rollup-plugin-terser';
export default {
input: 'src/tracker/index.js',
output: {
file: 'public/script.js',
file: 'public/tracker.js',
format: 'iife',
},
plugins: [