matomo-org / matomo-org/tracker-proxy

Extra website showing in Matomo dashboard in addition to the tracked one

Open
#88 7 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
158
Forks
46
PR merge metrics
No merged PRs in 30d

Description

I am using Proxy Tracker with latest Matomo, here are the specs:

  • Matomo version: 5.1.2
  • MySQL version: 10.6.20-MariaDB-ubu2204
  • PHP version: 8.3.14
  • Ubuntu 22.04

on a specific domain used for tracking matomo-server.com.

I am using this matomo-server.com to track multiple websites: tracked-domain-1.com and tracked-domain-2.com, by adding the matomo folder in the sites and using also the Token for the UserTrackingAPI.

Each of the tracked-domain-1.com and tracked-domain-2.com have the JS code added that looks like this:

<!-- 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="//tracked-domain-2.com/matomo/";
    _paq.push(["setTrackerUrl", u+"matomo.php"]);
    _paq.push(["setSiteId", "hashed-value-here"]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0];
    g.type="text/javascript"; g.async=true; g.defer=true; g.src=u+"matomo.php"; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->

The tracked-domain-1.com is the first website I've setup on matomo-server.com and the primary domain.

The issue I have now is that inside Matomo's dashboard for tracked-domain-2.com, I am seeing clicks and URLs from tracked-domain-1.com:

matomo proxy tracker

Any idea what what's the issue and solution here?
Is there any way I can troubleshoot this to find what's causing this?

It's confusing to see 2 sites in the same dashboard : \

Thank you!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the embedded JavaScript tracking snippet and the Matomo dashboard configuration for tracked-domain-1.com and tracked-domain-2.com. Reproduce the cross-site data issue using the supplied Matomo, PHP, and MariaDB versions, then inspect the tracker URL and site ID used for each request. Done means the source of the mixed site data is identified and the two dashboards show only their own visits.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.