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

Cannot display evolution chart for segmented data before plugin installation date #9

Open
mimmovele opened this issue Apr 13, 2017 · 9 comments

Comments

@mimmovele
Copy link

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.

@sgiehl
Copy link
Member

sgiehl commented Apr 13, 2017

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

@sgiehl
Copy link
Member

sgiehl commented Apr 13, 2017

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.

@Facens
Copy link

Facens commented Apr 21, 2017

@sgiehl thanks for your help. What would that SQL query be?

@sgiehl
Copy link
Member

sgiehl commented Apr 21, 2017

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

@mimmovele
Copy link
Author

mimmovele commented Apr 24, 2017

@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.

@sgiehl
Copy link
Member

sgiehl commented Apr 24, 2017

The initial question was about segmented data. Are you using preprocessed segment reports? Or are you referring to the normal reports now?

@mimmovele
Copy link
Author

@sgiehl we need both.

@sgiehl
Copy link
Member

sgiehl commented Apr 24, 2017

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/

@mimmovele
Copy link
Author

@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?

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

No branches or pull requests

3 participants