How to Create Custom Spy Pixel Filtering Rules for Your Account
Discover how to personalize Gblock by creating custom spy pixel filtering rules.
What Are Custom Spy Pixel Filtering Rules?
While Gblock automatically blocks most spy pixels, it also gives you the power to define your own filtering rules. These custom rules let you extend the default definitions, giving you additional control over what gets blocked or allowed in your inbox.
Custom rules can be used, for example, to block a particular domain or to allowlist specific URLs that you trust.
How to Create Custom Filtering Rules
Visit the custom filters page from the user dropdown menu:

Click on "Add new" to create a new custom filter:

Fill in the form by selecting the action (allow or block), naming the rule, and defining the filter. Filters follows the Chrome declarativeNetRequest syntax and can be defined in two formats:
- String: Matches URLs that contain a specific substring. For example,
track.example.com
would match any image hosted on that domain. - Regular Expression (Regex): For advanced filtering, use Regex to match more complex patterns like query parameters, image filenames, or tracking behaviors. For instance,
/utm_.*=/
would catch any image URL with a UTM parameter.

If multiple rules apply to the same URL, your custom rule will take precedence over the default behavior. You can define up to 50 custom rules, allowing for highly personalized control while keeping performance optimized.
Your inbox, your rules. Take full control of spy pixel filtering with Gblock.