Thanks Thomas although I am a beginner at the coding bit of WordPress. I go the plugin way to insert Facebook Pixels but LifterLMS got me stumped. Bear with me.
So I’ve got the Facebook Pixel code all ready here in my notepad, I assume that I will need to paste that in line 24 of your code. My next question would be, where should I paste the entire code? I could not find a confirmation page in LifterLMS.
@aisyahpatthi,
LifterLMS doesn’t have a “facebook pixel plugin” — there’s a ton out there for WooCommerce and other carts but we haven’t built one (yet) and I haven’t seen anyone else build one either. I’m sorry. We have a small team and LifterLMS does a lot of things but I haven’t been able to write code for every situation yet. It’s coming but we’re small… Custom code is the only solution I can reliably refer you to.
LifterLMS also isn’t a regular ecommerce platform. When you buy a t-shirt you hit a confirmation page because, well, what else would you want when you buy a t-shirt? A confirmation number and a message that says “THANKS @aisyahpatthi”
When you buy a course though, what do you want to do? Start the course. So we skip the “Thanks for buying” and drop students back into the course. It’s not that were being jerks and trying to prevent you from tracking conversions, it’s that we don’t feel that thank you page makes any sense in an LMS situation.
So we don’t have a confirmation “page” we have “confirmation variables” in the URL that developers can use to identify when a conversion has occurred.
The above code will run only when those conversion variables are found.
Yes, paste your snippet onto Line 24
Custom code like this can most easily be added to a child theme’s functions.php file (do not copy the opening <?php” line
Or you can add it to a custom plugin.
Here’s a guide: https://lifterlms.com/docs/how-do-i-add-custom-code-to-lifterlms-or-lifterlms-launchpad/
Hope that helps,