Hi all,
I have just taken over the administration of a Wordpress homepage. I have got the following tasks. First add the Meta pixel code in all headers of the page. This I have done, and it is working.
Second task is to add Facebook conversion tracking for two Gravity Forms on the page. Both are contact forms that, when a user presses submit, should get registered as a “Lead” with Meta Pixel.
What I have done is installed Code Chest, and added this code:
$( ‘#gform_GFFORMID’ ).on( ‘submit’, function() {
fbq(‘track’, ‘Lead’);
} );
With Gravity Forms 2.9 and greater, the recommended way to perform a custom action between the submit button being clicked and the request being sent to the server is to use the new gform/submission/pre_submission filter: