Track generator ID in custom dimension

Preparing to add back search parameters to share links
This commit is contained in:
Misode
2021-10-30 17:34:54 +02:00
parent b4d43c55bd
commit bb1223df60
3 changed files with 12 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ export function cleanUrl(url: string) {
}
export function getGenerator(url: string) {
const trimmedUrl = url.replace(/^\//, '').replace(/\/$/, '')
const trimmedUrl = url.replace(/^\//, '').replace(/\/$/, '').replace(/\?.*/, '')
return config.generators.find(g => g.url === trimmedUrl)
}