Adding geolocation to session
Permalink
I'm using max mind to geolocate my site's visitors, I need that info to be persistent across all the pages they visit, so I would like to add that data to the global $_SESSION variable, what would be the best place to do that in concrete5 startup routine. I'm not sure where exactly headers are created, it would need to be before that I suppose.
Note that this is used for any visitor not registered user.
Note that this is used for any visitor not registered user.
This would be after the session was created but should be before most headers.
If you are using a Package you can use the Package::on_start() method to attach to an on_start event. But if this is a one off site, using /config/site_post.php would likely be the simplest approach.
Best Regards,
Mike
http://mkly.io