• Resolved hommealone

    (@hommealone)


    In some set-ups with staging and production environments, statistics plugins which store their data in the main WordPress database pose problems. Hosting plans like Dreamhost’s Dreampress plan have an all-or-nothing arrangement when copying an environment’s database up or down: you can only copy the entire database, and cannot skip individual tables.

    In those all or nothing situations, if we copy the production environment down to the staging environment, then do some work on the site in the staging environment for a few days, and then copy back up to the production environment, there will have been no stats about visitors to the production site collected for those several days; the staging database over-writes the database in the production environment when we copy up, erasing the data collected in the interim period.

    Is that also the case with the Matomo Analytics plugin for WordPress? If so, is there any way around that?

    Is Matomo On-Premise a possible alternative? Does Matomo On-Premise keep data in a separate database all together? And if so, the production site will continue to add statistics into the database all along, regardless of copying up or down – right?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    Hi @hommealone

    Is that also the case with the Matomo Analytics plugin for WordPress? If so, is there any way around that?

    Matomo for WordPress stores analytics data in the WordPress database, so it will have the same problem, unless you are able to ignore some tables.

    Matomo on-premise is a standalone install of Matomo (as in, not embedded in WordPress), so it would store the data in a separate database, potentially a separate domain/hosting provider should you require that. And yes, your production WordPress site will continue to track data to the separate on-premise Matomo, regardless of what’s in your WordPress database (though there can be caveats depending on how you add the Matomo tracking code).

    Thread Starter hommealone

    (@hommealone)

    Thanks for the quick reply!

    Using On-Premise, then, I could in theory load the tracking code conditionally, so it is only loaded into pages in the Production website, yes? (Might not be important; the staging environment gets almost no visitors. But the development work there might throw off the stats in funny ways.)

    You mention caveats depending on how we load the Matomo tracking code. Which method should we avoid if we don’t want to have problems?

    Is forum.matomo.org the better place to post questions about On-Premise?

    Thanks again!

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    Using On-Premise, then, I could in theory load the tracking code conditionally, so it is only loaded into pages in the Production website, yes?

    Yes, you can load the tracking code conditionally. You can load the tracking code in any way you want, really, how you embed the code snippet is entirely up to the website it’s hosted on.

    You mention caveats depending on how we load the Matomo tracking code. Which method should we avoid if we don’t want to have problems?

    I think in most cases it will be fine. It’s just that if you use a WordPress plugin to manage the tracking code or to do the tracking itself via server side tracking, the plugin may be affected by your staging/production setup, and you may need to be aware of that. Eg, it might save settings in the database that you may or may not want migrated from one environment to another. The specifics will of course depend on your setup.

    Is forum.matomo.org the better place to post questions about On-Premise?

    Yes, the Matomo forums are where you would get free support.

    Thread Starter hommealone

    (@hommealone)

    Great. Thanks for your help, much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.