Geo Targeting Error

Hello,

When I am using this code, it’s working fine and showing the image only in United states;

<script language="JavaScript">
var geo = disp();
if (geo[0] == 'US'){
      document.write('<a href="http://site1.com"><img src="https://4.bp.blogspot.com/-MNrIWHwF8zA/WVmjgMjAW_I/AAAAAAAAHQk/LBQ_UQfo_YAzMYXt0B0q7GIPdzPusqo2ACLcBGAs/s1600/bn.png"></a>');
   }
</script>

Now I want to know how can I edit the code add few more countries (Uk, Canada, Australia, etc.) where I want to show the same Image?

Do you have a specific list of countries, or do you want to get the country list dynamically?

If you have a specific list, you could just do this: if (geo[0] == 'US' || geo[0] == 'CA' || geo[0] == 'AU') . Is that what you were looking for?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.