plugin-MarketingCampaignsReporting
plugin-MarketingCampaignsReporting copied to clipboard
Cannot display evolution chart for segmented data before plugin installation date
Hi Piwik team, we've installed the Marketing Campaigns Reporting plugin on Apr 5, 2017, v3.0.2. We can't see data before the installation date of the plugin, only data after. How can we generate reports for the past? Shouldn't the referral data (the UTMs) be in the piwik db anyway? Please note that we've already executed the core:archive task for the past w/o success.
Any help would be greatly appreciated, thanks.
I'll investigate this. Guess we should be able to make it possible to view the campaign names and keywords for periods before the installation of this plugin
Ok. This is a bit tricky to solve. The new campaign data ist stored in other database fields.
To get segmented data for old and new campaign you could adjust the segment you are using
instead of campaignName==x
you could use campaignName==x,referrerName==x
Alternatively you could update the log_visit table, I could provide a simple update sql or maybe add a command to the plugin to make that possible. But doing that automatically on install isn't something we can do, as such an update can run really long for big databases.
@sgiehl thanks for your help. What would that SQL query be?
UPDATE `log_visit` SET `campaign_name` = `referer_name`, `campaign_keyword` = `referer_keyword` WHERE `referer_type` = 6;
You may add your table prefex (eg piwik_
) to the table name log_visit
@sgiehl we've applied the query:
UPDATE `piwik_log_visit` SET `campaign_name` = `referer_name`, `campaign_keyword` = `referer_keyword` WHERE `referer_type` = 6
but no data previous the plugin's installation have been shown.
We've also performed a core:archive action for a period of time previous to the plugin's installation date:
sudo -u www-data ./console core:archive --force-idsites=1 --force-date-range=2017-03-20,2017-04-04 --url=https://xxxxx
Thanks for your help.
The initial question was about segmented data. Are you using preprocessed segment reports? Or are you referring to the normal reports now?
@sgiehl we need both.
Running the archiver only might not have been enough, as it skips already archived data. You may need to invalidate or remove the reports for that dates. See https://piwik.org/faq/how-to/faq_59/ or https://piwik.org/faq/how-to/faq_155/
@sgiehl I'm afraid the above did not help.
We've invalidated:
sudo -u www-data ./console core:invalidate-report-data --dates=2017-03-01,2017-04-04 --sites=1
and then re-processed:
sudo -u www-data ./console core:archive --force-idsites=1 --force-date-range=2017-03-20,2017-04-04 --url=https://xxxxx
but nothing changed. Are we still missing something?