Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Removed encoding.
Mike Caofbea08ae59e7
diff --git a/next.config.js b/next.config.jsindex 5e3a1225b..e4e55ab76 100644--- a/next.config.js+++ b/next.config.js@@ -1,6 +1,5 @@/* eslint-disable @typescript-eslint/no-var-requires */require('dotenv').config();-const path = require('path');const pkg = require('./package.json');const TRACKER_SCRIPT = '/script.js';@@ -169,27 +168,22 @@ const config = {typescript: {ignoreBuildErrors: true,},- webpack(config) {- const fileLoaderRule = config.module.rules.find(rule => rule.test?.test?.('.svg'));-- config.module.rules.push(- {- ...fileLoaderRule,- test: /\.svg$/i,- resourceQuery: /url/,+ experimental: {+ turbo: {+ rules: {+ '*.svg': {+ loaders: ['@svgr/webpack'],+ as: '*.js',+ },},- {- test: /\.svg$/i,- issuer: fileLoaderRule.issuer,- resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] },- use: ['@svgr/webpack'],- },- );-- fileLoaderRule.exclude = /\.svg$/i;-- config.resolve.alias['public'] = path.resolve('./public');-+ },+ },+ webpack(config) {+ config.module.rules.push({+ test: /\.svg$/,+ issuer: /\.(js|ts)x?$/,+ use: ['@svgr/webpack'],+ });return config;},async headers() {diff --git a/src/tracker/index.js b/src/tracker/index.jsindex 73e8e5afe..1a9d1b192 100644--- a/src/tracker/index.js+++ b/src/tracker/index.js@@ -34,24 +34,6 @@/* Helper functions */- const encode = str => {- if (!str) {- return undefined;- }-- try {- const result = decodeURI(str);-- if (result !== str) {- return result;- }- } catch (e) {- return str;- }-- return encodeURI(str);- };-const parseURL = url => {try {const { pathname, search, hash } = new URL(url, location.href);@@ -67,9 +49,9 @@hostname,screen,language,- title: encode(title),- url: encode(currentUrl),- referrer: encode(currentRef),+ title,+ url: currentUrl,+ referrer: currentRef,tag: tag ? tag : undefined,});