Where to add Facebook pixel event code to track conversions?

Hi There.

I’ve created a Facebook pixel and I want to add event code to track when people click the paypal button and successfully sign-up etc…

Where do I do this specifically? The PayPal Buttons menu perhaps? or the API / Tracking menu?

Since that is a JS code, you should put it in your theme, not in s2M.

1 Like

Thank you very much Krum. I got it to work by adding it to my theme header. I appreciate your quick response.
-Brandon

You are welcome, I am happy to help :slight_smile:

Hey krumch,

If I want the FB pixel event code to only fire on certain pages, how can I set that up with my WordPress theme? Is there any URL’s people always reach once they successfully signup through S2 member?

I would add the code in some HTML element/snippet, that is specific to these pages. Or, I would build one new PHP file, content holder, and would put the code there.

You may hook a PHP function to “user_register” hook, it fires at registration time.

have the same problem
is there a way we can track the conversion and report back to the fb ads so we can check the ROAS? (return on ads spent)?

where shall we put the fb pixel to in this case pls?

Yes. This should go in API/Tracking.

You need to already have your pixel loaded in the head using your theme, etc. and then add this between script tags in API/Tracking. (the forum software didn’t like the script tags).

fbq('track', 'Purchase', {value: '%%initial%%', currency: 'USD'});

2 Likes

John, just in case you don’t know it, by API Tracking Ric is talking about this: WP Admin > s2Member > API / Tracking

:slight_smile:

1 Like

thank you sooooo much ric and cristian!! salute

1 Like