-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(matomo): support custom tracker urls #236
feat(matomo): support custom tracker urls #236
Conversation
@reslear is attempting to deploy a commit to the Nuxt Team on Vercel. A member of the Team first needs to authorize it. |
@@ -4,10 +4,12 @@ import { boolean, object, optional, string } from '#nuxt-scripts-validator' | |||
import type { RegistryScriptInput } from '#nuxt-scripts' | |||
|
|||
export const MatomoAnalyticsOptions = object({ | |||
matomoUrl: string(), // site is required | |||
siteId: string(), | |||
matomoUrl: optional(string()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm maybe we can deprecate this in favour if trackerUrl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably, because in the official documentation this name is used as an environment variable - apparently as syntax sugar
var u="//{$MATOMO_URL}/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
https://developer.matomo.org/guides/tracking-javascript-guide
I just don't know your policy on major releases so I left it for backwards compatibility. If it's not important, I'd remove it in favor of proper names and add full url's to doc.
Would you mind taking a look at the typecheck issue? then it should be good to go |
done |
β Type of change
π Description
https://docs.cookie3.co/cookie3-docs/integrations/website-integration/cookie3-script/nuxt
uses custom matomoto white-label analytics but some enhancement:
trackerUrl
siteId
but have a questions (ps. hi @harlan-zw):
It would probably be cool to use an
or
constructionmatomoUrl
ortrackerUrl
but probably optional easier to implement.I didn't modify
scriptInput.src
in the hope that if it is specified to the user explicitly it will overwrite the existing one, is this true ?