Yes, you can. You’ll need the following code for that:
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
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 in 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 account, 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 'Dev mode' on the left-hand side of the page:
Switch to the JS editor and paste the code from this article there. Make sure that the JS event is 'Popup fill':
Click on the ‘Save’ button and then click on 'Save & Exit' in the top right corner to finalize changes.
That's it! If you have any further questions or need any help, just let us know at support@optimonk.com and we would be happy to assist you :)
Comments