Hi @tychapman,
I’m afraid, there isn’t any out of the box setting regarding this. It’ll require custom code.
You could check the following example which helps to offer a similar workflow:
<?php
function add_events_fb() {
?>
<script>
(function($){
$(function(){
let _hust_form_id = '.hustle_module_id_1';
$(_hust_form_id).on('hustle:module:submit:success', function (e) {
fbq('trackCustom', 'NewHustleLead', {name: 'My Name', key: value, key, value});
});
});
})(window.jQuery)
</script>
<?php
}
add_action( 'wp_footer', 'add_events_fb', 21 );
Where “.hustle_module_id_1” in the the following line, defines the popup ID:
let _hust_form_id = '.hustle_module_id_1';
If your popup ID is 100, the mentioned line will be:
let _hust_form_id = '.hustle_module_id_100';
The above code can be implemented as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
Please do note the above code shared is more of an example, and you’ll have to add the FB Pixel events according to your needs.
You can check the FB developers documentation for more information on how events are tracked:
https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking/
Kind Regards,
Nithin
Hi @tychapman,
Since we haven’t heard from you for a while. I’ll mark this thread as resolved for now. Please feel free to re-open the thread if you need further assistance.
Best Regards
Nithin