> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.poptin.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# JavaScript targeting - how it works?

If you have a paid account, you will be able to show (or not show) a poptin to specific users who have JavaScript variables and values.

Using this feature you can target String, Number and Boolean variables.

1. Find the JS variable you can target

Click F12 in Chrome, then click on the Console tab, and insert the code below and hit Enter.

`for(var b in window) {   if(window.hasOwnProperty(b)){    if( typeof(window[b]) == "string" || typeof(window[b]) == "number" || typeof(window[b]) == "boolean"  ){        console.log("Variable Name: ",b);         console.log("Variable Value: ",window[b]);         console.log(" - - - - - - ")    }  }; }`

![](https://storage.crisp.chat/users/helpdesk/website/7a34af3b43dae400/image_jlhuch.png)

It will show you all the JavaScript variables and value you can target.

You should get something like this:

![](https://storage.crisp.chat/users/helpdesk/website/7a34af3b43dae400/image_1sz1xn3.png)

2. Enable the JS targeting on your poptin's display rules

Following are the steps:

* Go to the [Display Rules](https://help.poptin.com/article/show/117058-javascript-targeting-how-it-works) of your poptin.

![](https://storage.crisp.chat/users/helpdesk/website/7a34af3b43dae400/image_hovzwt.png)

* Click on "Show advanced display rules".

![](https://storage.crisp.chat/users/helpdesk/website/7a34af3b43dae400/image_1kgw5gw.png)

* Add The Rules to Show or Disable the JavaScript, and make sure the toggle is turned ON.

![](https://storage.crisp.chat/users/helpdesk/website/7a34af3b43dae400/image_11ww02.png)

* Click on "Publish".

![](https://storage.crisp.chat/users/helpdesk/website/7a34af3b43dae400/image_1ltmhcv.png)