Reporting-API: VisitsSummary - unique visitors with segments

Hi,

There are two segments defined in the piwik dashboard (Number of internal searches).
I’m using the bulk-request method on the reporting API to get the data of last week.
Three URLs are provided within the request.
[ul]
[li] VistsSummary without segment (total) of last week
[/li][li] VisitsSummary with segment ‘searches==0’ of last week
[/li][li] VisitsSummary with segment ‘searches>=1’ of last week
[/li][/ul]

The request itself works well, but I’m not sure how ‘nb_uniq_visitor’ is tracked on piwik.
If I sum up the values of both segments, it’s higher than the total number without segment.

Response segment ‘searches==0’:


        "From 2015-05-04 to 2015-05-10":{
            "nb_uniq_visitors":2192,

Response segment ‘searches>=1’:


        "From 2015-05-04 to 2015-05-10":{
            "nb_uniq_visitors":8354,

Response without segment:


        "From 2015-05-04 to 2015-05-10":{
            "nb_uniq_visitors":10174,

If I sum up nb_uniq_visitors of both segments, it would be 10546, but the total response says 10174.
The same values are also visible on the Piwik dashboard.

Is this behaviour correct? How does Piwik track unique visitors when it comes to segments for internal searches?

Thanks in advance for your help!

Best regards,
Daniel

Hi there,

this can maybe be explained because a same visitor can visit several times, and in some visit have no search and others have search and appear in both segments within the period

Hi Matt,

That makes sense, thanks for clarifying this topic!

Cheers,
Daniel