@mikkeschiren opened this Issue on November 16th 2021

I had problem to figure out which category to post this in.

Anyhow.
If I am running Matomo UI on a different domain like: dashboard.matomo.analytics is there a way to get the tracker scripts use another domain if they are only exposed on another sub domain (tracker.matomo.analytics) ?

Sure, the analytics people can change the domain from the tracker scipts to point to tracker.matomo.analytics instead dashboard.matomo.analytics - but there could many "human errors" if we do so.

So instead of


<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//dashboard.matomo.analytics/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

I want:


<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//tracker.matomo.analytics/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->
@Findus23 commented on November 16th 2021 Member
@mikkeschiren commented on November 16th 2021

Ah yes, thanks.

@mikkeschiren commented on November 18th 2021
This Issue was closed on November 18th 2021
Powered by GitHub Issue Mirror