Get GeoIP data on Visitor Log or Real-Time plugin?

Does anyone know how to get GeoIP data on individual visitors to show up on either the Visitor Log or the “Visitors in Real-Time” plugin? It would be very valuable to me to have that info.


Do you mean like the one on attached screenshot in this comment? - 301 Moved Permanently

If so, I can share my modification, though it’s not plugin and you’d have to adjust template with every piwik upgrade.

PS - hovering the flag in visitor log will show these in tooltip out-of-box


Yes, exactly like that! Thank you!

Just let me know what to do.

Go piwik/plugins/Live/templates/visitorLog.tpl and add

<br />{$visitor.columns.location}

at the end of block as below

				{if (isset($visitor.columns.provider)&&$visitor.columns.provider!='IP')} 
					<br />
					<a href="{$visitor.columns.providerUrl}" target="_blank" title="{$visitor.columns.providerUrl}" style="text-decoration:underline;">
				{/if}<br />{$visitor.columns.location}

that’s it.


Thank you! I modified the file and put the code at the bottom before the but the GEOIP location data didn’t show up. Is it supposed to show up right away or do I need to rebuild the MYSQL database?

When you hover over the country flag for each visit, do you see those in a tooltip? If not, it’s not related to the mod, but you don’t have those data.

Yes, that does the trick! And, just to clarify, this is the GEOIP of the USER–not the ISP, correct?

Yes, of user (IP), but it depends on db, with lite version it can be less accurate (sometimes even totally off). Paid one is more accurate, while still not 100%.

Here’s accuracy info -