Country, and city not showing in UI

neilgd72

New Member
Hi, I've set up geo custom fields of country and city, and have populated them programatically. They show up fine in the list:

1764585766076.png


But when I click through to a subscriber, they all (every single one has the same details) look like this:

1764585798779.png

Any ideas?
 

Attachments

  • 1764585740940.png
    1764585740940.png
    24.1 KB · Views: 1
I've set up geo custom fields of country and city, and have populated them programatically.
Did you properly setup the maxmind database? Follow the steps at https://www.mailwizz.com/kb/enable-campaign-geolocation-tracking-for-opens/ and download and place the file in the required location.

But when I click through to a subscriber, they all (every single one has the same details) look like this:
These seems to be yours, when another subscriber will visit, their details will show up.
 
Ah, I see. Thank you. Can I manually populate the internal geo data (I have tried setting the SUBSCRIBER_GEO_CITY custom field, but that doesn't seem to work)? I have access to the database.
 
Thank you! I have updated the IP addresses in the list_subscriber table:

1764702391259.png

And added details in the ip_location table:

1764702426683.png

And added a geo-data custom field, but it's still being populated with the record from the very first record in the ip_location table:

1764702618951.png

Any ideas?

Thank you!
 
100% positive. Maybe I am misunderstanding how the geo location works. Is it enough to add eg a Geo Location City field to the users, and it will then pull it in from the database?
 
I took a look in the code and it looks like:
PHP:
$geoCity = '';
if ($location = IpLocation::findByIp(request()->getUserHostAddress())) {
    $geoCity = $location->city_name;
}
So it will check the IP against the local database, and if it does not find it, will check against maxmind database.

So yes, it is enough to add the field.
 
That code looks like it comes from something which picks up where a subscriber is coming from when they eg click on a link? Which does seem to be working.

I think the issue that the correct information isn't being displayed on the subscriber details page, although it *is* displayed on both the summary grid and being populated when campaigns are sent.

Here are the grid items:

1764792234488.png

(The first 2 fields are text custom fields, and the second two are Geo fields).

And here is the subscriber details screen:

1764792286421.png
 
That code is taken exactly from the public subscribe page for a subscriber. Again, you see this because your IP matches it at the time when you load the page.
 
Back
Top