Ability to hardcode piwikUrl in DB?

We have an issue with our setup with multiple containers serving matomo and running archive jobs which are battling for setting piwikUrl in the database.

Problem: When someone visits matomo-dashboard.example.com thetable matomo_options with option_name piwikUrl is updated with matomo-dashboard.example.com. When then core:archive runs it updates the entry with htt p s://ipaddress/.

Is there a way to override this in config or environment variables? Either hardcoding the hostname or disabling dynamic update of the database.

The main problem with this is that MTM uses piwikUrl for preview serving which then again makes it impossible for us to keep track of the correct hostname when it changes dynamically all the time.

Hi @roflmao

Can you provide a screenshot for this, I don’t exactly understand the problem…:thinking:

$ while true; do /usr/bin/mysql  --database=matomo -e "SELECT option_value FROM matomo.matomo_option WHERE option_name='piwikUrl';" -N | grep -v '^+' && sleep 1s;done

Screenshot from preview loading:


g.src = '';

Sorry, your screenshot is not about Matomo. Please insert your image diretly in the message (just copy + paste)

Sorry i was a bit quick. This is about Matomo Tag Manager.
I created a seperate issue in Preview uses piwikUrl and doesnt seem overridable
Its about using piwikUrl from matomo database as baseurl for serving the javascripts, which is a variable that is changed all the time due to matomo design. I cannot find a way to override but i guess someone else should have had similiar problems.