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.
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(" - - - - - - ") } }; }
It will show you all the JavaScript variables and value you can target.
You should get something like this:
Enable the JS targeting on your poptin's display rules
Following are the steps:
Go to the Display Rules of your poptin.
Click on "Show advanced display rules".
Add The Rules to Show or Disable the JavaScript, and make sure the toggle is turned ON.
Click on "Publish".
Using this feature you can target String, Number and Boolean variables.
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(" - - - - - - ") } }; }
It will show you all the JavaScript variables and value you can target.
You should get something like this:
Enable the JS targeting on your poptin's display rules
Following are the steps:
Go to the Display Rules of your poptin.
Click on "Show advanced display rules".
Add The Rules to Show or Disable the JavaScript, and make sure the toggle is turned ON.
Click on "Publish".
Updated on: 15/11/2024
Thank you!