Support

Home Forums Event Espresso Premium EE4 and Facebook Pixel Purchase Tracking

EE4 and Facebook Pixel Purchase Tracking

Posted: August 3, 2023 at 11:45 am

Viewing 8 reply threads


seanrspence

August 3, 2023 at 11:45 am

New site and updated to EE4. Facebook pixel is installed. Events manager is tracking page views, but no purchases. Used Pixel My Site to install FB pixel. Double checked that the number was right (if it wasn’t, it wouldn’t track page views). We know purchases are taking place.

Any suggestions on what might be different with EE4 in regards to purchase tracking?

Thanks!


Rio

  • Support Staff

August 3, 2023 at 7:26 pm

If you are comfortable with PHP and are using a child theme, then try these instead:

Add JS to registration checkout: https://gist.github.com/lorenzocaum/397b6ca09bc1d1ab96b7

Add JS to the thank you page:
https://gist.github.com/lorenzocaum/307016676842e4f5c456

If you’re not using child theme, create a plugin instead.
It could also be added via a site specific plugin (https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/).

Thanks.


seanrspence

August 6, 2023 at 2:28 pm

Thank you. I implemented this but it’s still not working. I wasn’t sure which instance the instruction to “NOT include the opening PHP tag” was referring to.

See image. https://paste.pics/P0BII


seanrspence

August 6, 2023 at 2:28 pm

Thank you. I implemented this but it’s still not working. I wasn’t sure which instance the instruction to “NOT include the opening PHP tag” was referring to.

See image. https://paste.pics/P0BII


Rio

  • Support Staff

August 6, 2023 at 3:26 pm

Please do NOT include the opening php tag, except of course if you’re starting with a blank file.

I notice that you already have 300+ line of code, so you have to remove this part.
https://app.screencast.com/7sanFRw7whbHP

I believe, the pixel needs to be added in the header
“The pixel code is a snippet of JavaScript that’s added to the header section of your website.”

So you have to Change wp_footer to wp_head

After you installed it, you can now test it, you can install browser extension like this or similar.
https://app.screencast.com/jSdm2HmoxrRpj

btw, the pixel you installed is only available after checkout.

thanks


seanrspence

August 7, 2023 at 10:19 am

Thank you Rio for the help. I’ve made those changes you recommend.

Yes, I do have the Meta Pixel helper installed and it shows that the pixel is installed and tracking page view events on the site. That has not been a problem.

It was that the new site and the new EE4 install stopped tracking purchases when we made the update.

I will give this a day and see if it’s working. Thank you again.


Rio

  • Support Staff

August 7, 2023 at 6:02 pm

Awesome!

Have a wonderful day!


seanrspence

August 8, 2023 at 5:12 pm

Hi Rio … 🙁 Still not working. Did you get a chance to look at my code and see if it looks right? And if it does, do you have any other suggestions besides creating a site specific plugin?


Rio

  • Support Staff

August 8, 2023 at 7:55 pm

Hmm, I can see that you have pixel working, in event list
https://app.screencast.com/tdlPZg5VGKx3s

can you tell us if you see meta pixel helper detected in checkout?

I can do test purchase too, but i need you to fill this.
https://eventespresso.com/send-login-details/

thanks


seanrspence

August 9, 2023 at 5:42 pm

Thanks Rio, I did a test myself and definitely see the pixel is on the checkout at https://apcalrocknranch.com/registration-checkout/?uts=1691623931&event_cart=view#checkout and the thank you page: https://apcalrocknranch.com/thank-you/?e_reg_url_link=1-1ff5033dccb35bea1770addf53a45c89

Do you have any other suggestions?


Rio

  • Support Staff

August 9, 2023 at 7:41 pm

right, i can see that pixel is now fixed.

are you looking for FB event?, we dont have article on that, but i saw something that can be helpful to you.

if pixel didn’t detected the purchase event,
https://www.facebook.com/business/help/555177831677798

try this
https://www.facebook.com/business/help/898185560232180

I will also ask or marketing department if they have advice on this.

thanks
https://www.youtube.com/watch?v=BYsBQFv-KaI

Viewing 8 reply threads

The support post ‘EE4 and Facebook Pixel Purchase Tracking’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso