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

Show unique visitors stats if they are processed for the given date / period / range #5223

Closed
peterbo opened this issue May 24, 2014 · 15 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@peterbo
Copy link
Contributor

peterbo commented May 24, 2014

  1. If unique visitor stats are processed for a given date / period / range, they should be shown in the action- and the custom-variable reports.
  2. Exports - When a Datatable is exported, include a consistent set of columns (some export formats export unique visitor stats, others don't). I can't even consitently reproduce this behavior, so this needs further investigation.

This was experienced against Piwik 2.2.0.

@mattab
Copy link
Member

mattab commented May 25, 2014

  • In actions reports, Unique visitors should always be displayed for "day" period. Unique cannot be processed for other periods (or date ranges). If the data is in the API and not displayed in the UI, can you give specific examples?
  • displaying unique visitors for Custom Variables is covered in UNIQUE VISITORS for custom variables #5109
  • please can you post example from the API maybe on demo?

@peterbo peterbo added this to the 2.x - The Great Piwik 2.x Backlog milestone Jul 8, 2014
@mattab mattab added Bug For errors / faults / flaws / inconsistencies etc. and removed Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. labels Oct 11, 2014
@mattab mattab modified the milestones: Short term, Mid term Oct 11, 2014
@mattab
Copy link
Member

mattab commented Dec 1, 2014

@peterbo feel free to re-open a new issue if you still experience something like this in 2.9.1

@mattab mattab closed this as completed Dec 1, 2014
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Dec 1, 2014
@mattab
Copy link
Member

mattab commented Dec 1, 2014

btw default for processing uniques are set here: https://github.com/piwik/piwik/blob/master/config/global.ini.php#L126-L131

@mattab
Copy link
Member

mattab commented Dec 4, 2014

Hi @YehiaAboSedera so you are seeing nb_uniq_visitors in the API response but it is not displayed in the interface, is it correct?

@ghost
Copy link

ghost commented Dec 4, 2014

@mattab yes exactly

@mattab mattab removed the answered For when a question was asked and we referred to forum or answered it. label Dec 7, 2014
@mattab mattab modified the milestones: Piwik 2.11.0, Short term Dec 7, 2014
@mattab
Copy link
Member

mattab commented Dec 7, 2014

Moved to 2.11.0 milestone

@tsteur
Copy link
Member

tsteur commented Jan 22, 2015

I have no idea what is do be done here. Where in the interface is it missing? I can see it when going to "Visitors => Overview" which is basically the API.get visualization of the above image / API response.

Custom Variables is handled in a different issue as mentioned so wondering what to do here.

@mattab
Copy link
Member

mattab commented Feb 7, 2015

Hi @YehiaAboSedera @peterbo please comment here and reopen issue if you still experience this in 2.10.0

Closing as it works for us

@mattab mattab closed this as completed Feb 7, 2015
@mattab mattab added the worksforme The issue cannot be reproduced and things work as intended. label Feb 7, 2015
@milantestagena
Copy link

I found what cause this error:
you count unique visitors on this way:

SELECT count(distinct idvisitor) FROM piwik.log_visit_table
where visit_field > '2015-02-01' and visit_field < '2015-03-01'
AND ( v1 = 'Ext' OR v1 = 'Int' );
(I changed key names for security reason)
and when user is in both groups, Int and Ext
you loose one Unique Visits

so, you need to count this:
SELECT count(distinct idvisitor, v1) FROM piwik.log_visit_table
where visit_field > '2015-02-01' and visit_field < '2015-03-01'
AND ( v1 = 'Ext' OR v1 = 'Int' );

@tsteur
Copy link
Member

tsteur commented Mar 9, 2015

Can you post the proper field names? It is not a security problem since they are public here in the source code

@milantestagena
Copy link

in LogAgregator
Metrics::INDEX_NB_UNIQ_VISITORS => "count(distinct " . self::LOG_VISIT_TABLE . ".idvisitor)",
change to
Metrics::INDEX_NB_UNIQ_VISITORS => "count(distinct " . self::LOG_VISIT_TABLE . ".idvisitor, " . self::LOG_VISIT_TABLE . ".custom_var_v1)",

@tsteur
Copy link
Member

tsteur commented Mar 11, 2015

This looks like custom logic to me but I it can make sense. I reckon it depends on the kind of application and what custom variables are used for. If I understand it correctly, you do want to count two unique visitors in case there is one visitor having two entries each with a different custom variable? @mattab ?

@mattab
Copy link
Member

mattab commented Mar 11, 2015

@milantestagena can you create a new issue explaining what you are doing and what you would ideally need us to do? this issue is closed already

@sansac
Copy link

sansac commented Nov 18, 2015

Even After updating Metrics::INDEX_NB_UNIQ_VISITORS => "count(distinct " . self::LOG_VISIT_TABLE . ".idvisitor, " . self::LOG_VISIT_TABLE . ".custom_var_v1)" in LogAgregator, Unique visitors count showing blank for custom variables in piwik.
I enabled unique visitor in piwik based on http://piwik.org/faq/how-to/#faq_113

piwik1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

5 participants