> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invoca.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Is It Possible to Prevent the Invoca Tag from Running for Specific IP Addresses?

> Block the Invoca Tag from running for specific IP addresses using custom code that checks a visitor's IP against a block list before autoRun fires.

The Invoca Tag doesn't have built-in support for capturing a visitor's IP address as marketing data attribution. To block the tag from running for specific IP addresses, you'll need to provide:

* **A data source:** a global variable, cookie, or session storage — whichever method you use to store and share the visitor's IP address with the Tag.
* **A list of blocked IP addresses:** the IPs for which the Invoca Tag shouldn't run.

Using this information, custom code in the Tag can read the IP address from your specified data source, check whether it's on your blocked list, and prevent the Tag from running if it matches.

```js theme={null}
// Provide the list of IPs to block, and maintain it as needed.
var IP_BLOCK_LIST = ['ip1', 'ip2'];

// Provide the data source to read a visitor's IP address. This example reads from the window object.
var userIp = window.ipAddress;

Invoca.Client.isUserBlockList = function () {
  return IP_BLOCK_LIST.includes(userIp)
}

// Set autoRun to true only if the user isn't on the block list.
options.autoRun = !Invoca.Client.isUserBlockList()
```

## Where to go next

* [Tag Wizard: Custom Code](/s/article/tag-wizard-custom-code)
* [Tag Wizard: Custom Code Settings](/s/article/tag-wizard-custom-code-settings)
