0

I'm using 2 different CMS, WordPress and MyBB. I've searched for the answer but can find it nowhere. Any ideas?

closed as off-topic by Simon Hayter May 27 at 17:33

  • This question does not appear to be about webmastering within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Have you searched for Geo Targeting? – Trebor May 27 at 16:13
  • Sorry but this question is considered off-topic because the solutions required are those in programming nature, coding based or requests for resources are off-topic. is more suited for Stack Overflow (SO). – Simon Hayter May 27 at 17:33
2

You can roughly target people by nationality by checking their browser setting in JavaScript:

if (navigator.languages.includes("en-US") ||
    navigator.languages.includes("en-AU")) {
    // show the image and link
}

https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/languages

There are also ways of getting people's location using geo-lookup. Ideas here:

https://stackoverflow.com/questions/391979/how-to-get-clients-ip-address-using-javascript

It may be easiest to just find plugins to do what you want, though.

Not the answer you're looking for? Browse other questions tagged or ask your own question.