I want to list certain things for different cities. In other words, when someone from New York visits my website, I want to list "Best Language Courses in New York".
I can do that by using PHP composer and installing geoip2/geoip2 (https://github.com/maxmind/GeoIP2-php), I can easily get visitor's location, timezone etc.
I know there are numerous tools/plugins showing different prices for different countries. So, something similar must be being used.
My concern is that I'll be getting visitors' IP addresses without their consent. I won't be using or storing this information; instead, I'll only be listing specific things according to visitor location.
Is it possible that this will harm my SEO score or cause me to be blacklisted? Would it be safe in Google's eyes?
Thank you alot.
Update: I'm considering creating this field on the sidebar in blogposts as a sticky element (not more than 100 words). So, It'll make up a small portion of the page. If the user's location can't be determined by ipaddress, I want to show the most popular courses. It'll be a dynamic content and will change for each visitors so I wonder what the search engines would index for this field.