eea / volto-matomo

Matomo integration for Volto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support other matomo config params

giuliaghisini opened this issue · comments

in particular:

  • trackerUrl
  • srcUrl

Suggestion: add it in src/utils.js like:

....
**const trackerUrl =
window.env?.RAZZLE_MATOMO_TRACKER_URL ||
config.settings.matomoTrackerUrl ||
undefined;

  const srcUrl =
    window.env?.RAZZLE_MATOMO_SRC_URL ||
    config.settings.matomoSrcUrl ||
    undefined;**

  if (siteId) {
    _matomo.instance = createInstance({
      urlBase,
      siteId,
      **trackerUrl,
      srcUrl,**
    });
  } else {
    /* eslint-disable-next-line */
    console.warn(
      'Matomo SiteID is not defined, page actions will not be tracked',
    );
  }

....