geotargeting website content


J

Jeff

hi

asp.net 3.5

I wonder if there are some simple way of geotargeting the content of a
website. I ask cause I want to place CPA ads on my website, some CPA
campaigns are only visible to users of a certain country. So I thought of
make a check of which country the visiting user comes from and then load the
correct CPA offer for that country.

I know about ip2location where you can check against for free. but wonder if
there are some other ways I implement this, maybe geocloaking - haven't done
it before as it's a bit blackhat.

any suggestions?
 
Ad

Advertisements

J

Jeff

Jeff said:
hi

asp.net 3.5

I wonder if there are some simple way of geotargeting the content of a
website. I ask cause I want to place CPA ads on my website, some CPA
campaigns are only visible to users of a certain country. So I thought of
make a check of which country the visiting user comes from and then load
the correct CPA offer for that country.

I know about ip2location where you can check against for free. but wonder
if there are some other ways I implement this, maybe geocloaking - haven't
done it before as it's a bit blackhat.

any suggestions?

Right now I'm trying Request.UserLanguages[0], which returns what I suppose
is the preferred language of the user client browser, then use this info to
determine which country the user is from. Not 100% bullet proof as for
example I'm using Norwegian settings, if I travell to another country and
start browsing from that country I will still be using Norwegian language...
Think I use this in the meanwhile of finding something better
 
A

Alexey Smirnov

asp.net 3.5
I wonder if there are some simple way of geotargeting the content of a
website. I ask cause I want to place CPA ads on my website, some CPA
campaigns are only visible to users of a certain country. So I thought of
make a check of which country the visiting user comes from and then load
the correct CPA offer for that country.
I know about ip2location where you can check against for free. but wonder
if there are some other ways I implement this, maybe geocloaking - haven't
done it before as it's a bit blackhat.
any suggestions?

Right now I'm trying Request.UserLanguages[0], which returns what I suppose
is the preferred language of the user client browser, then use this info to
determine which country the user is from. Not 100% bullet proof as for
example I'm using Norwegian settings, if I travell to another country and
start browsing from that country I will still be using Norwegian language....
Think I use this in the meanwhile of finding something better

So, why ip2location is not good for you?
 
G

Gregory A. Beamer

Jeff said:
hi

asp.net 3.5

I wonder if there are some simple way of geotargeting the content of a
website. I ask cause I want to place CPA ads on my website, some CPA
campaigns are only visible to users of a certain country. So I thought of
make a check of which country the visiting user comes from and then load
the correct CPA offer for that country.

I know about ip2location where you can check against for free. but wonder
if there are some other ways I implement this, maybe geocloaking - haven't
done it before as it's a bit blackhat.

any suggestions?

The end game is this. I have an IP. It is registered to some group, which is
located in some country. Essentially, I go back to a registry to find out
where it is registered. One choice is registries like ARIN, APNIC and RIPE.
Years ago, I created an app that culled information from these sites (screen
scrape) for a company that did not want to purchase this information. Today,
you have services like ip2location, etc, which offer the same type of
service, so you don't have to do a lot of programming to get your
information.

The only issue I have with things like ip2location comes when you need
immediate feedback. Any public service can go down or experience some
network latency. You need a backup methodology, just in case. But there are
others out there you can use (just Google). I am sure there are also
databases you can buy, but I am not sure they are cost effective for serving
worldwide CPA ads. Just my two cents on this matter.

One backup, which can also be flawed, is examining culture. I would not
choose language over culture, as EN-US and EN-UK are different regions. Same
with ES-SP, ES-MX, etc. I realize you can delve down, but Culture is what
the .NET framework looks at, and since it takes no additional lines of code
to use culture over language ...

As stated above, the culture is set at the thread level and ties back to
language, but it is easier to work for customization, as there is already a
great deal of globalization/localization code in .NET. Michele Leroux
Bustamante has some great articles on the MSDN site on
globalization/localization, if you need to get a theoretical background with
some practical advice. She also maintains her own site, which has additional
info.

The point is you are getting into design. Think through the optimal path
(sounds like you have) and then start looking for roadblocks, potholes, etc
and create mitigation plans. You will never hit 100% accurate, but you can
do fairly well for 99.9% of the people (or greater).

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************
 
J

Jeff

Gregory A. Beamer said:
The end game is this. I have an IP. It is registered to some group, which
is located in some country. Essentially, I go back to a registry to find
out where it is registered. One choice is registries like ARIN, APNIC and
RIPE. Years ago, I created an app that culled information from these sites
(screen scrape) for a company that did not want to purchase this
information. Today, you have services like ip2location, etc, which offer
the same type of service, so you don't have to do a lot of programming to
get your information.

The only issue I have with things like ip2location comes when you need
immediate feedback. Any public service can go down or experience some
network latency. You need a backup methodology, just in case. But there
are others out there you can use (just Google). I am sure there are also
databases you can buy, but I am not sure they are cost effective for
serving worldwide CPA ads. Just my two cents on this matter.

One backup, which can also be flawed, is examining culture. I would not
choose language over culture, as EN-US and EN-UK are different regions.
Same with ES-SP, ES-MX, etc. I realize you can delve down, but Culture is
what the .NET framework looks at, and since it takes no additional lines
of code to use culture over language ...

As stated above, the culture is set at the thread level and ties back to
language, but it is easier to work for customization, as there is already
a great deal of globalization/localization code in .NET. Michele Leroux
Bustamante has some great articles on the MSDN site on
globalization/localization, if you need to get a theoretical background
with some practical advice. She also maintains her own site, which has
additional info.

The point is you are getting into design. Think through the optimal path
(sounds like you have) and then start looking for roadblocks, potholes,
etc and create mitigation plans. You will never hit 100% accurate, but you
can do fairly well for 99.9% of the people (or greater).

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************

As of now I use this code to determine country. I know it's not perfect, but
maybe it will be 99% accurate.
It's some code I came across when googling, maybe I remove the extra if for
"tr"

public static CultureInfo GetCulture()
{
HttpRequest Request = HttpContext.Current.Request;
if (Request.UserLanguages == null)
return null;

string lang = Request.UserLanguages[0];
if (lang != null)
{
// *** Problems with Turkish Locale and upper/lower case
// *** DataRow/DataTable indexes
if (lang.StartsWith("tr"))
return null;
try
{
return new CultureInfo(lang);
}
catch
{
return null;
}
}
else
return null;
}

then in my code I check against cultureinfo.Name:
eksample : culture.Name == 'no' for Norway
 
J

Jeff

Jeff said:
Gregory A. Beamer said:
The end game is this. I have an IP. It is registered to some group, which
is located in some country. Essentially, I go back to a registry to find
out where it is registered. One choice is registries like ARIN, APNIC and
RIPE. Years ago, I created an app that culled information from these
sites (screen scrape) for a company that did not want to purchase this
information. Today, you have services like ip2location, etc, which offer
the same type of service, so you don't have to do a lot of programming to
get your information.

The only issue I have with things like ip2location comes when you need
immediate feedback. Any public service can go down or experience some
network latency. You need a backup methodology, just in case. But there
are others out there you can use (just Google). I am sure there are also
databases you can buy, but I am not sure they are cost effective for
serving worldwide CPA ads. Just my two cents on this matter.

One backup, which can also be flawed, is examining culture. I would not
choose language over culture, as EN-US and EN-UK are different regions.
Same with ES-SP, ES-MX, etc. I realize you can delve down, but Culture is
what the .NET framework looks at, and since it takes no additional lines
of code to use culture over language ...

As stated above, the culture is set at the thread level and ties back to
language, but it is easier to work for customization, as there is already
a great deal of globalization/localization code in .NET. Michele Leroux
Bustamante has some great articles on the MSDN site on
globalization/localization, if you need to get a theoretical background
with some practical advice. She also maintains her own site, which has
additional info.

The point is you are getting into design. Think through the optimal path
(sounds like you have) and then start looking for roadblocks, potholes,
etc and create mitigation plans. You will never hit 100% accurate, but
you can do fairly well for 99.9% of the people (or greater).

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************

As of now I use this code to determine country. I know it's not perfect,
but maybe it will be 99% accurate.
It's some code I came across when googling, maybe I remove the extra if
for "tr"

public static CultureInfo GetCulture()
{
HttpRequest Request = HttpContext.Current.Request;
if (Request.UserLanguages == null)
return null;

string lang = Request.UserLanguages[0];
if (lang != null)
{
// *** Problems with Turkish Locale and upper/lower case
// *** DataRow/DataTable indexes
if (lang.StartsWith("tr"))
return null;
try
{
return new CultureInfo(lang);
}
catch
{
return null;
}
}
else
return null;
}

then in my code I check against cultureinfo.Name:
eksample : culture.Name == 'no' for Norway
somehow this method is causing problem in firefox browsers, method returns
null
 
Ad

Advertisements

J

Jeff

Jeff said:
Jeff said:
Gregory A. Beamer said:
hi

asp.net 3.5

I wonder if there are some simple way of geotargeting the content of a
website. I ask cause I want to place CPA ads on my website, some CPA
campaigns are only visible to users of a certain country. So I thought
of make a check of which country the visiting user comes from and then
load the correct CPA offer for that country.

I know about ip2location where you can check against for free. but
wonder if there are some other ways I implement this, maybe
geocloaking - haven't done it before as it's a bit blackhat.

any suggestions?

The end game is this. I have an IP. It is registered to some group,
which is located in some country. Essentially, I go back to a registry
to find out where it is registered. One choice is registries like ARIN,
APNIC and RIPE. Years ago, I created an app that culled information from
these sites (screen scrape) for a company that did not want to purchase
this information. Today, you have services like ip2location, etc, which
offer the same type of service, so you don't have to do a lot of
programming to get your information.

The only issue I have with things like ip2location comes when you need
immediate feedback. Any public service can go down or experience some
network latency. You need a backup methodology, just in case. But there
are others out there you can use (just Google). I am sure there are also
databases you can buy, but I am not sure they are cost effective for
serving worldwide CPA ads. Just my two cents on this matter.

One backup, which can also be flawed, is examining culture. I would not
choose language over culture, as EN-US and EN-UK are different regions.
Same with ES-SP, ES-MX, etc. I realize you can delve down, but Culture
is what the .NET framework looks at, and since it takes no additional
lines of code to use culture over language ...

As stated above, the culture is set at the thread level and ties back to
language, but it is easier to work for customization, as there is
already a great deal of globalization/localization code in .NET. Michele
Leroux Bustamante has some great articles on the MSDN site on
globalization/localization, if you need to get a theoretical background
with some practical advice. She also maintains her own site, which has
additional info.

The point is you are getting into design. Think through the optimal path
(sounds like you have) and then start looking for roadblocks, potholes,
etc and create mitigation plans. You will never hit 100% accurate, but
you can do fairly well for 99.9% of the people (or greater).

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************

As of now I use this code to determine country. I know it's not perfect,
but maybe it will be 99% accurate.
It's some code I came across when googling, maybe I remove the extra if
for "tr"

public static CultureInfo GetCulture()
{
HttpRequest Request = HttpContext.Current.Request;
if (Request.UserLanguages == null)
return null;

string lang = Request.UserLanguages[0];
if (lang != null)
{
// *** Problems with Turkish Locale and upper/lower case
// *** DataRow/DataTable indexes
if (lang.StartsWith("tr"))
return null;
try
{
return new CultureInfo(lang);
}
catch
{
return null;
}
}
else
return null;
}

then in my code I check against cultureinfo.Name:
eksample : culture.Name == 'no' for Norway
somehow this method is causing problem in firefox browsers, method returns
null

in firefox this code Request.UserLanguages[0], returns "nb" instead of "no",
anyone knows what "nb" is? I mean some keyword I can google to get the
simillar code for germany, spain, australia, england, canada and united
states.

PS: "nb" means Norwegian Bokmål, the most common language in Norway, the
other language is Nynorsk, excluding sami
 
A

Alexey Smirnov

hi
asp.net 3.5
I wonder if there are some simple way of geotargeting the content ofa
website. I ask cause I want to place CPA ads on my website, some CPA
campaigns are only visible to users of a certain country. So I thought
of make a check of which country the visiting user comes from and then
load the correct CPA offer for that country.
I know about ip2location where you can check against for free. but
wonder if there are some other ways I implement this, maybe
geocloaking - haven't done it before as it's a bit blackhat.
any suggestions?
The end game is this. I have an IP. It is registered to some group,
which is located in some country. Essentially, I go back to a registry
to find out where it is registered. One choice is registries like ARIN,
APNIC and RIPE. Years ago, I created an app that culled information from
these sites (screen scrape) for a company that did not want to purchase
this information. Today, you have services like ip2location, etc, which
offer the same type of service, so you don't have to do a lot of
programming to get your information.
The only issue I have with things like ip2location comes when you need
immediate feedback. Any public service can go down or experience some
network latency. You need a backup methodology, just in case. But there
are others out there you can use (just Google). I am sure there are also
databases you can buy, but I am not sure they are cost effective for
serving worldwide CPA ads. Just my two cents on this matter.
One backup, which can also be flawed, is examining culture. I would not
choose language over culture, as EN-US and EN-UK are different regions.
Same with ES-SP, ES-MX, etc. I realize you can delve down, but Culture
is what the .NET framework looks at, and since it takes no additional
lines of code to use culture over language ...
As stated above, the culture is set at the thread level and ties backto
language, but it is easier to work for customization, as there is
already a great deal of globalization/localization code in .NET. Michele
Leroux Bustamante has some great articles on the MSDN site on
globalization/localization, if you need to get a theoretical background
with some practical advice. She also maintains her own site, which has
additional info.
The point is you are getting into design. Think through the optimal path
(sounds like you have) and then start looking for roadblocks, potholes,
etc and create mitigation plans. You will never hit 100% accurate, but
you can do fairly well for 99.9% of the people (or greater).
--
Peace and Grace,
Greg
Twitter: @gbworld
Blog:http://gregorybeamer.spaces.live.com
************************************************
|    Think outside the box!                        |
************************************************
As of now I use this code to determine country. I know it's not perfect,
but maybe it will be 99% accurate.
It's some code I came across when googling, maybe I remove the extra if
for "tr"
public static CultureInfo GetCulture()
{
   HttpRequest Request = HttpContext.Current.Request;
   if (Request.UserLanguages == null)
return null;
   string lang = Request.UserLanguages[0];
   if (lang != null)
   {
// *** Problems with Turkish Locale and upper/lower case
// *** DataRow/DataTable indexes
if (lang.StartsWith("tr"))
    return null;
try
{
    return new CultureInfo(lang);
}
catch
{
    return null;
}
   }
   else
return null;
}
then in my code I check against cultureinfo.Name:
eksample :  culture.Name == 'no' for Norway
somehow this method is causing problem in firefox browsers, method returns
null

in firefox this code Request.UserLanguages[0], returns "nb" instead of "no",
anyone knows what "nb" is? I mean some keyword I can google to get the
simillar code for germany, spain, australia, england, canada and united
states.

PS: "nb" means Norwegian Bokm�l, the most common language in Norway, the
other language is Nynorsk, excluding sami

The first part of culture string is language (Bokmål as you said), the
second part is a country code.

For more information
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.createspecificculture.aspx
http://forums.asp.net/t/1210117.aspx
http://norskwebforum.no/viewtopic.php?f=17&t=38061

Hope this helps
 
Ad

Advertisements

V

varunramesh87

Hello,

Check out geolify.com .Geolify provides location based geo targeted contentdelivery services where you can activate/deactivate google ads javascript depending on the visitor location. This means you can show your ads only topeople from certain countries.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top