Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After enabling the plugin, wrong numbers are reported for overlapping timeframes (core campaign handling vs. plugin campaign handling) #102

Open
peterbo opened this issue Jun 13, 2022 · 5 comments

Comments

@peterbo
Copy link

peterbo commented Jun 13, 2022

Reported here: matomo-org/matomo#19318 and also experienced this myself, if the MarketingCAmpaignsReporting plugin was not active from the beginning (but activated later, while data was already in the system).

The report Acquisition -> Campaigns reports only numbers since the activation of the MarketingCampaignsreporting plugin for overlapping timeframes. For timeframes before the activation, report data is still correct.

The report Acquisition -> All Channels -> Campaigns still reports correct numbers, also for overlapping / intersecting timeframes.

@sgiehl
Copy link
Member

sgiehl commented Jun 13, 2022

That's because the plugin is actually creating it's own dimension fields in the log tables. When it's installed later, that means for old records they are empty.
We could either try to copy over the values on install of the plugin (which could cause trouble for bigger installs) or merge the reports with the core reports, where no data is available for the plugin (which will at least make incorrect data on the day the plugin is installed).

@solevis
Copy link

solevis commented Jun 14, 2022

That's because the plugin is actually creating it's own dimension fields in the log tables. When it's installed later, that means for old records they are empty. We could either try to copy over the values on install of the plugin (which could cause trouble for bigger installs) or merge the reports with the core reports, where no data is available for the plugin (which will at least make incorrect data on the day the plugin is installed).

Hi @sgiehl, the UPDATE query mentioned in issue #9 still valid to update data for MarketingCampaignsReporting log tables?

@sgiehl
Copy link
Member

sgiehl commented Jun 14, 2022

@solevis Yes it should.

@peterbo
Copy link
Author

peterbo commented Jun 14, 2022

Hey @sgiehl

We could either try to copy over the values on install of the plugin (which could cause trouble for bigger installs) or merge the reports with the core reports, where no data is available for the plugin (which will at least make incorrect data on the day the plugin is installed).

I agree that this could be dangerous for bigger instances and could lead to more unwanted behaviour. Perhaps, this problem is just something to be documented well:

  • Campaign reports will be "broken" for overlapping periods (core campaign handling vs MCR plugin)
  • if the user wants to fix that, here are the mysql queries for copying over the past campaign data to the new structure and this is how to invalidate / re-archive past reports (if necessary)

In most cases, this won't be necessary, but it'd be good to have this in the MarketingCampaignReportings docs.

@solevis
Copy link

solevis commented Jul 4, 2022

@solevis Yes it should.

I executed the query and data seems correct now, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants