Can I use any kind of tracking codes in the popup (for instance, Facebook pixel)?

Yes, you can. You’ll need the following code for that:


s.parentNode.insertBefore(t,s)}(window, document,'script',
fbq('init', '1719342018283696');
fbq('track', 'Subscribe');



You need to replace it with the FB pixel code used by you, but the script and the noscript tags must be removed.

You can also put any other tracking codes to the place of the FB pixel code. In this case, this will be run in case of a conversion.

To make it work, log in to your OptiMonk dashboard, select Campaigns on the left, then select the Campaign where you want to implement the tracking:


On the next page, click on the Campaign Variant you wish to edit, this will take you to the Campaign Editor:


Once you are in the editor, click on the “Code" button on the right-hand side of the page, on the floating bar:


Switch to the JS editor and paste the updated code there. Make sure that the JS event is "Popup filled":


Click on the ‘Preview’ button to confirm the changes, and then click ‘Save’.

Have more questions? Submit a request