Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Do not require urlBase and siteId if matomo is disabled #449

Open
KrzysztofMadejski opened this issue Feb 18, 2021 · 0 comments
Open

Do not require urlBase and siteId if matomo is disabled #449

KrzysztofMadejski opened this issue Feb 18, 2021 · 0 comments

Comments

@KrzysztofMadejski
Copy link

I have urlBase: '', siteId: '', disabled: true, but I'm getting the following

Error: Matomo urlBase is required.
new MatomoTracker
src/MatomoTracker.ts:20
  17 |     }
  18 |     if (!userOptions.siteId) {
  19 |         throw new Error('Matomo siteId is required.');
> 20 |     }
     | ^  21 |     this.initialize(userOptions);
  22 | }
  23 | initialize({ urlBase, siteId, userId, trackerUrl, srcUrl, disabled, heartBeat, linkTracking = true, configurations = {}, }) {
View compiled
createInstance
src/instance.ts:5
  2 | function createInstance(params) {
  3 |     return new MatomoTracker(params);
  4 | }
> 5 | export default createInstance;
  6 | //# sourceMappingURL=instance.js.map
View compiled

I'd expect matomo-tracker not to throw errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant