Forum Moderators: martinibuster

Message Too Old, No Replies

inline text link referrals and country filters

there's a "little" problem

         

muszek

1:30 am on Sep 7, 2007 (gmt 0)

10+ Year Member



Here's the problem:
a page contains a box with some neat text about a relevant widget and a referral text link embedded inside (as in "I've seen a cool site that offers great widgets, you should check it out"). The only problem is that it seems that the advertizer started to filter out less attractive countries (poorly converting... I'm getting paid for free registrations).

So if a visitor from a less attractive (including my own, that's how I noticed) country visits the page, he sees a text: "I've seen a cool site that offers, you should check it out" since the text link isn't displayed.

How can I resolve this issue? I could display nothing or something else in this place based on visitor's IP, but how do I check which countries are filtered out? If you have any idea, please reply.

AussieWebmaster

11:42 pm on Sep 7, 2007 (gmt 0)

10+ Year Member



the filter is in the server side programming generally... or possibly in a js file or some javascript in the head tag

tim222

12:07 am on Sep 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would try to check the length of the ad to see if it exists, and if not, replace it with something else. This will be difficult to explain in detail without actually writing the code and trying it out, but here's an overview of what I'm thinking:

Put the ad in a <DIV> element and all of the text, including the ad in another <DIV>. Let's say the ad's DIV id is "AdDiv" and the text DIV id is "TextDiv." You could check to see if AdDiv exists using getElementById and InnerHTML.length.

For example:

<DIV id='TextDiv'>I've seen a cool site that offers <DIV id='AdDiv'>{{great-widget-code}}</DIV>, you should check it out.</DIV>

<script type="text/javascript">
if (document.getElementById("AdDiv").innerHTML.length == 0)
{
document.getElementById("TextDiv").innerHTML = "some other ad code";
}
</script>

I'm not sure if this will work because I haven't tried it :) But this is where I would start.