GeoIP visitor city location not consolidating

This is another GeoIP issue, as of Piwik 1.9.1.

Here’s what I’m seeing: if I go to “Visitors–>Locations & Provider” and view City data, city visits are not consolidated in the list of cities.

For example, I might see this:

Chicago, Illinois, United States: 53
Chicago, Illinois, United States: 42
Minneapolis, Minnesota, United States: 37
Chicago, Illinois, United States: 34

And so on.

This is only an issue with the City data. The State data does consolidate by state. So taking my above example and viewing by State, I would see:

Illinois, United States: 129
Minnesota, United States: 37

Anyone else seeing this type of behavior?

Yes, I noticed this today after installing GeoIP. I executed the geoipUpdateRows.php and deleted the piwik_archive_* tables to re-process the data. I see the same bug as rstein.

It’s not a bug, we did this way by design, to avoid confusing 2 same cities in 2 different regions.

Do you suggest we remove the region name from the “city region country” label ? I think it’s better with the region name personnally… ?

These are the same cities in the same “regions” in the same countries. There is only one Chicago, Illinois, United States.

I don’t understand why you would want to see these kind of duplicates?

Sorry I misread the bug description! Can you please post a screenshot of this bug and explain if you have used the script import or only the standard javascript tag? any other special things that apply to your piwik?

I tried on the http://demo.piwik.org but it seems to work as expected there?

The screenshot looks basically like rstein’s example.

The things I found out after taking some time to try and find the source of the bug (ultimately unsuccessful):

  • (after turning on sql debugging) There is an SQL statement executed that does result in unique locations (it does a proper ‘GROUP BY country, region, city’) but i’m not sure where the results are used because the debug output does not have a backtrace for each query

  • From what I can tell, it seems that each duplicate city has slightly different latitudes and/or longitudes

EDIT: these entries are not from apache log (etc) imports, but from the javascript client

Thanks for the report, I created a bug at: Some cities appear multiple times in a same period report · Issue #3511 · matomo-org/matomo · GitHub

please post further comments or ideas / finding realted to this bug in the ticket directly. Since you looked into it maybe you have more suggestions :wink:

Same issue here; and I did the same process as mscdex ( executed the geoipUpdateRows.php and deleted the piwik_archive_* tables to re-process the data ).
Just thinking aloud, I’m wondering if maybe it might be due to visitors from a given city coming through different Internet providers. Just more mud against the wall.
Whatever is causing it, would be far more useful if the data was consolidated.
And yes, for the regions (state) widget, it appears to be working fine.

File attached. As you will notice, there are multiple entries for Minneapolis and Saint Paul (and others).

Also, please notice the ‘Unknowns’ count. What can be done to dig into that group and parse for more accuracy???

Could it have to do with visitor privacy settings?
We do not include the last octet of the visitor’s IP address in the logs.
What are the rest of you collecting?

I can confirm 7478 fixes this for me (after regenerating the archive tables). Thanks!

Thank you!

Maybe I spoke too early on this one… I’m just starting to try out the API and it’s giving me duplicated cities in the output when I have “idSite=all”. :S

This is fixed in latest beta IIRC, Index of /

I just uploaded the latest beta. Problem still exists.

As an example, if I sort on ‘City’, I have 37 lines of Minneapolis, MN; all with different values.

Grrrrrrrrrrrr

[quote=“Richard Here”]
I just uploaded the latest beta. Problem still exists.

As an example, if I sort on ‘City’, I have 37 lines of Minneapolis, MN; all with different values.

Grrrrrrrrrrrr[/quote]

Do you mean from the Visitor report via the piwik web interface or via the API directly?

Web Interface
(I’m not familiar with the direct access via API. Please point me to instructions for that.)
Please see my other thread at: 301 Moved Permanently.
In case it is related.

… Still have the problem.

We need YOUR help! We are running a crowd funding campaign to raise funds to implement the detailed Visitors Maps of Countries, Regions and Cities (for all countries)!

These maps will be beautiful, usable, and built using open standards SVG+JS. They will show detailed visitor count, conversion rates, by Country but also (New!) by city and region.

Pledge now at: http://crowdfunding.piwik.org/analytics-maps-world-country-city-region/

There will be no more flash in Piwik and we will add amazing new Maps of your visitors.

Piwik needs you!

We need YOUR help! We are running a crowd funding campaign to raise funds to implement the detailed Visitors Maps of Countries, Regions and Cities (for all countries)!

These maps will be beautiful, usable, and built using open standards SVG+JS. They will show detailed visitor count, conversion rates, by Country but also (New!) by city and region.

Pledge now at: http://crowdfunding.piwik.org/analytics-maps-world-country-city-region/

There will be no more flash in Piwik and we will add amazing new Maps of your visitors.

Piwik needs you!