matomo-org/plugin-Provider

All providers unknown

nasiralamreeki opened this issue · 45 comments

The plugin does not seem to work for me all providers are showing as unknown and I have a MaxMind license.

Do you maybe have IP anonymization enabled? If so you need to make sure that the option to use the non anonymized IP for visitor enrichment is used.

I do not have IP anonymization enabled and Matamo is picking up all IP addresses just fine the plug-in just isn't resolving them.

Have you configured the location provider to use the correct GeoIP databases?

@sgiehl any help with this? It definately seems to be an issue with the plugin as the unresolved IP addresses I run through https://www.maxmind.com/en/geoip-demo resolve just fine.

This issue happens with both IPv4 and IPv6 IP addresses and while some are now resolving I would say more than half of visitors providers show "Unknown" but if I manually query using MaxMind they resolve fine every time.

@nasiralamreeki would you mind giving me access to your matomo instance and maybe send some example IPs so I can try to reproduce. As Geolocation admin requires super user access it might be helpful to have a user with highest privileges. If so feel free to send them by mail to stefan@matomo.org

@nasiralamreeki would you mind giving me access to your matomo instance and maybe send some example IPs so I can try to reproduce. As Geolocation admin requires super user access it might be helpful to have a user with highest privileges. If so feel free to send them by mail to stefan@matomo.org

I'm using the WordPress Matomo Plugin. Do you need a WordPress admin access?

@nasiralamreeki Yes. that should work as well in this case

We are also seeing this. We upgraded in December and since then we also get unknowns for all visitors.

It was immediately at the upgrade point so appears to be version related than server (as nothing else changed).

@sgiehl see comment above but I'm also working on access for you. I need to check with my board to make sure granting access is ok.

@sgiehl you should have received an email inviting you to reset your password so you can access the backend.

But also see another user who is experiencing the same issue since the last update.

Let me know when you've completed your look at the Matamo backend via WordPress.

@tsteur It seems it's possible to install that plugin for Wordpress, but it seems Matomo won't download any GeoIP Provider database in this case, is that correct? Might be worth to automatically download the GeoLite2 ASN database if the plugin is activate maybe.

@sgiehl indeed. Created matomo-org/matomo-for-wordpress#446 to make the plugin work with this plugin and #12 to mark it as no longer compatible. Once merged, we could release a new version so it's no longer marked as compatible. We could close this issue and continue work in the WP Matomo issue.

@sgiehl indeed. Created matomo-org/matomo-for-wordpress#446 to make the plugin work with this plugin and #12 to mark it as no longer compatible. Once merged, we could release a new version so it's no longer marked as compatible. We could close this issue and continue work in the WP Matomo issue.

Is there any timeframe on this? Being able to reliably see provider metadata is important to us

Would be good to know.

We're not using the WordPress integration.

@iammattmartin the plugin should work with "normal" Matomo. Did you configure a Provider/Organisation database in Geolocation admin?

@tsteur We might not need to mark the plugin as incompatible. The reverse DNS lookup works for wordpress, and manually uploading a provider geoip db might also work. it only doesn't support automatic set up for it.

@iammattmartin the plugin should work with "normal" Matomo. Did you configure a Provider/Organisation database in Geolocation admin?

@tsteur We might not need to mark the plugin as incompatible. The reverse DNS lookup works for wordpress, and manually uploading a provider geoip db might also work. it only doesn't support automatic set up for it.

@sgiehl could you point to some doc for where to acquire this database and how to upload and configure it so we can use the provider plugin as described until there's a fix either for this plugin or where provider lookup is hard coded into Matamo itself?

@sgiehl Yes, same settings prior to that upgrade and it shows the right data.

According to this provider, your current location is:

(51.496, -0.122)
United Kingdom

Org: My ISP name here
ISP: My ISP name here
Refresh
Note: This GeoIP implementation has access to the following types of databases: City, Country, ISP Database.

This is using the second (DBIP/GeoIP 2) option with up to date Maxmind datasets.

@nasiralamreeki sorry there's no timeframe for this yet.

@sgiehl in the Matomo for WordPress plugin there isn't a way to configure it. It's all done automatically. Is it this DB that is needed for MaxMind and it's only available for paid ? https://www.maxmind.com/en/geoip2-isp-database and for DB-
IP it is https://db-ip.com/db/download/ip-to-asn-lite ?

@tsteur it works with both databases. But maxmind also has a free database: https://dev.maxmind.com/geoip/geoip2/geolite2-asn-csv-database/ (its also available as mmdb when logged in)
Also actually the GeoIP implementation should automatically pick up all geoip files it is able to find in the geoip directory. So uploading it manually might work.

@iammattmartin so the admin shows the correct values, but the visitor log doesn't show them? If so:

Do you maybe have IP anonymization enabled? If so you need to make sure that the option to use the non anonymized IP for visitor enrichment is used.

@sgiehl Nope.

As I say, all settings remain as they were prior to the upgrade where it was working. We've never changed that and it isn't enabled now.

We see all data as we used to, just not the provider name.

@iammattmartin does calling this API method return a value for isp or org for you?
index.php?module=API&method=UserCountry.getLocationFromIP&ip=194.57.91.215

<result>
<error message="You can't access this resource as it requires view access for at least one website."/>
</result>

@iammattmartin you need to provide a token_auth to the request. or use a session token_auth. There should be an example link in the API listing that should work.

Found the API example

index.php?module=API&method=UserCountry.getLocationFromIP&ip=194.57.91.xxx&format=JSON&token_auth=xxxxx&force_api_session=1

continent_name	"Europe"
continent_code	"EU"
country_code	"FR"
country_name	"France"
city_name	"Besançon"
lat	47.246
long	6.021
postal_code	null
region_code	"BFC"
region_name	"Bourgogne-Franche-Comte"
isp	"Renater"
org	"Renater"
ip	"194.57.91.215"

Ok. That looks correct. Could you check if the table log_visit has a column location_provider and if the recent visits have a value set for this column?

It does.

It was populated until that upgrade in December and has been NULL ever since.

Are you using javascript tracking or log importing?

We are using the JS implemention.

would you mind sharing the diagnostic output of Matomo? Maybe it helps to identify a problem.

I can do but there no errors or warnings...

No matter. The details might help me to exclude some possible reasons and maybe reproduce the issue locally

Hmm theres a few things in there I don't want to post publicly but all have green ticks*.

*except the matomo.js which we copied to m.js and use instead as noted on your forums.

It however has no impact on this working as it fails with the correctly named file too. We've been using m.js for 2+ years without issue.

Feel free to send the report to stefan@matomo.org instead, so I can have a quick look.

@iammattmartin Had a quick look, but couldn't see any obvious that would explain the issue.
Unfortunately I don't have more time right now to dig deeper into this issue.

OK. If you can leave this issue open though as it would be nice to fix given downgrading isn't likely an issue.

@sgiehl Do you know when we will be able to try and debug this further?

We use this data along with our advertising strategy so the loss of that is quite impacting.

We've paid for a number of plugins too but seems that this issue has no real urgency and is affecting others.

@tsteur @sgiehl can the fix for WP provider be released?

@nasiralamreeki it will be released likely this week (I mean the WordPress plugin)

@sgiehl can you also release a new version with the recent change in this plugin if not done yet?

@sgiehl can you also release a new version with the recent change in this plugin if not done yet?

done

I've done some further debug on this.

Providers re-appear when I disabled QueuedTracking and as soon as this was re-enabled, providers are then shown as unknown again.

@nasiralamreeki are you using QueuedTracking?

@iammattmartin I am not and my issues were resolved with the fix already pushed