Please add this block for Admob

Can you please add this block?

What it should do is return if the user is located in the EU. This way we can make the Revoke Consent Button visible for EU users and set it to invisible for non-EU users.

I think there is a block to detect the country, you could use that block + a CSV list with the codes of European countries

euCountries = {
"BE", "EL", "LT", "PT", "BG", "ES", "LU", "RO", "CZ", "FR", "HU", "SI", "DK", "HR",
"MT", "SK", "DE", "IT", "NL", "FI", "EE", "CY", "AT", "SE", "IE", "LV", "PL", "UK",
"CH", "NO", "IS", "LI"

List extracted from Reddit

Thanks for that. I’ve searched Kodular docs but can’t find any block to check a user’s location for a country. If anyone can tell me where this is I’d be grateful. It’s not under Location Sensor as you’d think and I can’t see it anywhere else.

I’ve done some more searching and found this.

Unfortunately when I click it it shows my country as United Kingdom (which is ok) but as “GB” instead of “UK”.

I just noticed that the block shows a country / region, but not the user’s country , so in this case I can show you the following blocks:

Explanation: When starting the screen a Web Component makes a request to “”, this returns information such as country and IP

When get the response the variable “UserCountry” will be set in the country code by JSON decoding, in my case “UY”

In the procedure “isEuropeanUser” it is verified if the value of “UserCountry” is in the list of European countries that is in CSV format

For the life of me I cannot find the FetchUserCountry block anywhere.

FetchUserCountry is a Web Component


I see what you did.

You renamed the Web1 component to FetchUserCountry.

1 Like

@deanart2012, this is the correct post to the solution:

I would have done it but I’m not TL3 in this new account :joy:

Thanks @Mateja

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