Home >
Programming, Servers & Scripts >
Free Maxmind Alternative for STM (30)
04-28-2014 06:26 PM
#1
richierich (Member)
Free Maxmind Alternative for STM
I joined this forum yesterday, i would like to preset here my GEO IP solution for those folks who can't afford or care to invest in Maxmind GEO IP Database setup.
In order to use this service, the following JavaScript must be included in your page:
Code:
<script src="//geoapi123.appspot.com" type="text/javascript"></script>
You can include visitor's location using.
Code:
Country Code: <script>document.write(geoip_country_code());</script>
Country Name: <script>document.write(geoip_country_name());</script>
City: <script>document.write(geoip_city());</script>
Region: <script>document.write(geoip_region());</script>
Region Name: <script>document.write(geoip_region_name());</script>
Please ask if you have any doubt about this service. There is no limit on number of queries. This service is provided to your free of cost, so please don't abuse.
04-29-2014 02:53 AM
#2
richierich (Member)
Thanks
04-29-2014 05:58 AM
#3
zeno (Administrator)
What backend database does this use? Is it basically a Google hosted app that interacts with a Maxmind database?
Actually this is a cool idea - offloading it to somewhere you control to enable javascript lookups from your own service/app. Can you give more info?
Also, for me it returns Auckland (way off). Although FB, Speedtest.net and so on report Hamilton, also way off. I think the issue comes down to it detecting my ISPs gateway and that is only in the same city as a NZ'er when they live in one of maybe 5-10 large cities.
04-29-2014 07:47 AM
#4
dario (Member)
This is great for people who need to split test LP with or without geo-location before buying Maxmind DBs.
04-29-2014 07:58 AM
#5
ricmed (Member)
Funny I was just setting up this today and all the resources i found were paid so thanks dario!
How many clicks are we talking non-abuse wise? 
For the technical folks here: are there any security concerns using this?
thanks
04-29-2014 08:17 AM
#6
dario (Member)

Originally Posted by
richierich
Please ask if you have any doubt about this service.
My only concern is that you can easily track LPs URL of people using this tool.
04-29-2014 08:20 AM
#7
richierich (Member)

Originally Posted by
ricmed
Funny I was just setting up this today and all the resources i found were paid so thanks dario!
How many clicks are we talking non-abuse wise?
For the technical folks here: are there any security concerns using this?
thanks
You can send 10 million+ clicks.
Abuse: Don't ddos i
04-29-2014 08:26 AM
#8
richierich (Member)

Originally Posted by
dario
My only concern is that you can easily track LPs URL of people using this tool.
Yes and no.
Only information that can be gathered from backend is:
IP Address ( and all info that can be derived from IP address )
Your Landing page URL ( You can use SSL on your domain and it won't send me referer info )
If you don't want to use SSL, you can always send traffic from
Landing page -> Your Domain -> GEO IP API.
Only 'your domain' will be visible not landing page.
04-29-2014 04:09 PM
#9
richierich (Member)
Thank you for feedback. I hope, this service help someone succeed.
04-29-2014 05:18 PM
#10
dotcom (Member)
Thanks for sharing! Is this using the new GeoIP2 from Maxmind?
04-29-2014 05:26 PM
#11
richierich (Member)

Originally Posted by
dotcom
Thanks for sharing! Is this using the new GeoIP2 from Maxmind?
We using Maxmind GEO IP2 in backend. Bought 1 year updates in advance.
Thanks!
04-29-2014 05:59 PM
#12
theboss (Member)
Would you consider posting a privacy policy?
What are you going to do with all the data containing domains and what cities they are being marketed in?
04-29-2014 10:20 PM
#13
zeno (Administrator)
Also, what about server infrastructure? How much does it cost for the Google instance? It would be really cool if you could DNS-load balance this to multiple servers to give a faster global service. I'd definitely use it provided there was a privacy policy in place, failover system, etc.
04-30-2014 03:21 AM
#14
richierich (Member)

Originally Posted by
zeno
Also, what about server infrastructure? How much does it cost for the Google instance? It would be really cool if you could DNS-load balance this to multiple servers to give a faster global service. I'd definitely use it provided there was a privacy policy in place, failover system, etc.
$ 0.000025 CPM. Google only provides United States or in the European Union instances. They provide no means to implement GEO based load balancing.
Currently its auto load balanced and scales well with increase in traffic.
04-30-2014 03:39 AM
#15
richierich (Member)

Originally Posted by
zeno
Also, what about server infrastructure? How much does it cost for the Google instance? It would be really cool if you could DNS-load balance this to multiple servers to give a faster global service. I'd definitely use it provided there was a privacy policy in place, failover system, etc.
Best, for you is to implement a simple php script to spit out same info.
Then deploy it in geographically distinct datacenters. Use service like
http://www.dnsmadeeasy.com/services/...ffic-director/ to route request to nearest server. GEOIP2 lookup is use very low amount of resources, so it can potentially server lots of requests without additional instances.
04-30-2014 05:07 AM
#16
zeno (Administrator)
Yeah that's what I was thinking, thanks!
04-30-2014 06:07 AM
#17
crysper (Member)
Why are you giving this for free?
There are guys here with millions of hits and for sure it will cost you a bit if this gets popular.
04-30-2014 06:48 PM
#18
andrea1987 (Member)

Originally Posted by
richierich
I joined this forum yesterday, i would like to preset here my GEO IP solution for those folks who can't afford or care to invest in Maxmind GEO IP Database setup.
In order to use this service, the following JavaScript must be included in your page:
Code:
<script src="//geoapi123.appspot.com" type="text/javascript"></script>
You can include visitor's location using.
Code:
Country Code: <script>document.write(geoip_country_code());</script>
Country Name: <script>document.write(geoip_country_name());</script>
City: <script>document.write(geoip_city());</script>
Region: <script>document.write(geoip_region());</script>
Region Name: <script>document.write(geoip_region_name());</script>
Please ask if you have any doubt about this service. There is no limit on number of queries. This service is provided to your free of cost, so please don't abuse.
I did as you said but the page display like this even when i upload it to my server
http://i.imgur.com/VhXwmOW.png
05-01-2014 03:17 AM
#19
tqpt (AMC Alumnus)
richierich does not fear money
05-01-2014 03:58 AM
#20
zeno (Administrator)

Originally Posted by
andrea1987
You are including a MaxMind script at the top of your page... not the one OP has provided.
05-01-2014 04:22 AM
#21
richierich (Member)

Originally Posted by
andrea1987
Replace this url:
Code:
<script src="http://j.maxmind.com/app/geoip.js" type="text/javascript"></script>
with
Code:
<script src="//geoapi123.appspot.com" type="text/javascript"></script>
06-26-2014 07:19 PM
#22
gotepc (Member)
I am trying to install the STM mobile tracker today and luckily found this thread. Can someone explain to me where exactly I put this in my root folder?
Thanks
06-27-2014 01:15 AM
#23
zeno (Administrator)
What root folder do you mean? It certainly doesn't go in the server root where you have e.g. etc, usr, var, bin, and so on.
You need to make a domain or addon domain.
Then, find your www root - i.e. where your website files go. I'm not sure if you're using managed hosting and/or cPanel - if so the easiest way would be to create an FTP account for your domain and connect that way.
You then need to make a MySQL user and database (cPanel has a wizard), and plug these details into the 202-config.php file (rename it to remove sample if there).
Then, upload to the root directory of that site and run mydomain.com/install.php.
06-27-2014 11:11 AM
#24
gotepc (Member)
Sorry I didn't give more specifics, I have a domain with BH.
So I just copy/paste the info from the first post directly into my 202-config.php file and I'm done? I already finished the guide but skipped the step with GeoIP so the tracker is already installed on the domain. After changing the 202-config.php file on the server do I need to still run mydomain.com/install.php?
This takes the place of the step involving the GeoIP, correct?
Thanks
06-27-2014 06:43 PM
#25
caurmen (Administrator)
I wouldn't particularly recommend using this service - you'll see that user richierich, who posted it, has been banned subsequently.
Use GeoIP with your installation to be sure!
And yes, you'll still need to run install.php.
Hope that helps!
07-02-2014 11:04 PM
#26
gotepc (Member)
Thanks Caurmen! So with GeoIP, do I purchase the GeoIP Country for $50? https://www.maxmind.com/en/country
07-03-2014 03:24 AM
#27
zeno (Administrator)

Originally Posted by
gotepc
Depending on what installation you are doing, there are free GeoIP and GeoIP2 databases that are less accurate - but free!
http://dev.maxmind.com/geoip/legacy/geolite/
http://dev.maxmind.com/geoip/geoip2/geolite2/
The first has databases you can use with the STM tracker. The latter can be used for GeoIP lookups on web pages via using composer (Caurmen did a tutorial on this).
The only database you need to buy is the Organisational database if you want mobile carrier lookups.
07-03-2014 10:47 AM
#28
gotepc (Member)
I am just trying to install the STM track for mobile following the guide. I am focusing on mobile right now so should I just get geolite, and https://www.maxmind.com/en/organization?
I see many different download options for geolite. This is all very foreign to me. Which one do I want?
Edit: It looks like from Caurmen's Maxmind post from 2013, the BH servers already come with geolite installed? Does this change anything for me in setting up the tracking? I'm pretty lost.
07-04-2014 11:01 AM
#29
caurmen (Administrator)
You'll need the organisation database - that should be it. Just grab that and stick it in the /3rd-parties/geoip directory and you should be good to go.
09-28-2017 01:14 PM
#30
f4marketing (Member)
Hey,
I've found this post and it is really helpful even today in 2017 haha.
I have one noob question though. I want to set up some default placeholder value in case script won't work/ won't find a city.
Does anyone know the correct script?
Home >
Programming, Servers & Scripts >