question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable different matomo sites to be used based on config

See original GitHub issue

In order for tasks-assisted and teachosm to be tracked via matomo without diverging code, I am trying to make the tracker configurable for multiple site IDs.

The matomo code is found in client/index.html:

<!-- Matomo -->
<div id="optout-form"></div>
<script type="application/javascript">var site_id="9"</script>
<script type="application/javascript" src="https://cdn.hotosm.org/tracking-v2.js"></script>
 <!-- End Matomo Code -->

What I want to do is have an environment variable in tasking-manager.env that can set the site_id in that line above. I do not know if the client configuration can work in the same way the server configuration does, however, and could use some advice.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dakotabenjamincommented, May 22, 2019

Yes, I agree- in fact the whole matomo code should be optional for those who do not need it

0reactions
dakotabenjamincommented, Aug 12, 2019

This needs to be reimplemented in the redesign

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I configure a config setting in the config.ini.php ...
Use this feature if you want to overwrite a setting in the config/config.ini.php for a specific site while other ones should have a...
Read more >
Create and manage websites FAQ - Analytics Platform - Matomo
Matomo (Piwik) can be used to track an unlimited number of websites. Matomo can track pages on multiple domains and subdomains. Most users...
Read more >
Enable/Disable features on a per 'user' or per 'website' basis?
I run analyitcs for multiple customers in a single Matomo instance. I would like to offer my customers to opt-in to additional features...
Read more >
Configuration: DevelopInDepth - Developer Docs - v5
The INI config options are grouped into different sections. Sections are declared in the INI configuration with surrounding brackets, for example:
Read more >
Configure Matomo for security FAQ - Analytics Platform
Here are a few tips to make your Matomo server more secure and analytics data safer: Install Matomo in a separate MySQL (or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found