You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
601 B
25 lines
601 B
import { createInstance } from '@jonkoops/matomo-tracker-react'
|
|
import { InstanceParams } from '@jonkoops/matomo-tracker-react/lib/types'
|
|
|
|
import { PAGES } from 'config/pages'
|
|
|
|
const getMatomoInstance = () => {
|
|
let matomoInstance: InstanceParams = {
|
|
siteId: 999,
|
|
urlBase: 'link.to.domain',
|
|
}
|
|
|
|
switch (process.env.REACT_APP_CLIENT) {
|
|
case 'insports':
|
|
matomoInstance = {
|
|
...matomoInstance,
|
|
siteId: 1,
|
|
urlBase: PAGES.matomoInstatBaseUrl,
|
|
}
|
|
break
|
|
}
|
|
|
|
return createInstance(matomoInstance)
|
|
}
|
|
|
|
export const matomoInstance = getMatomoInstance()
|
|
|