matomo-org / matomo-org/docker

Wrong address in tracker code

Open
#251 2 comments 4 reactions 0 assignees View on GitHub
question
Dominant language
Shell
Stars
1k
Forks
384
PR merge metrics
No merged PRs in 30d

Description

using docker-compose from `.examples/nginx`, then running all necessary steps to get the first web tracking code, then I noticed it's displaying internal docker IP (172.18.0.2) instead of the current address (134.209.75.24:8080) in the tracking code

```

var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//172.18.0.2/";
_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);
})();

```
Notes: to get Docker internal IP, https://stackoverflow.com/a/20686101

EDIT: the address seems to be correct from dashboard page

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with docker-compose from `.examples/nginx`, complete the setup, and inspect the first generated tracking code. Compare its tracker URL with the address shown on the dashboard, then trace where the internal Docker IP is selected; done means the generated code uses the reachable address while preserving the dashboard behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.