Skip to content

Commit

Permalink
feat: use string for domains config and split by comma
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdmlln committed Jan 10, 2024
1 parent ad5a125 commit fb1a5fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { name, version } from '../package.json'
export const CONFIG_KEY = 'typo3Matomo'

export interface ModuleOptions {
domains: string[]
domains: string
matomoUrl: string
siteId: number
}
Expand All @@ -17,7 +17,7 @@ export default defineNuxtModule<ModuleOptions>({
configKey: CONFIG_KEY,
},
defaults: {
domains: [],
domains: '',
matomoUrl: '',
siteId: 0,
},
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/plugins/matomo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineNuxtPlugin(() => {

matomo.setTrackerUrl(new URL('matomo.php', config.matomoUrl).href)
matomo.setSiteId(config.siteId)
matomo.setDomains(config.domains)
matomo.setDomains(config.domains.split(','))

useHead({
script: [
Expand Down

0 comments on commit fb1a5fb

Please sign in to comment.