Podia makes it easy to track conversions with Google Analytics, Facebook Pixel, and Pinterest, but it's possible to do more sophisticated tracking using our JavaScript objects 🤓
These objects can be accessed through custom code added to your Podia site. This feature is available on our Mover and Shaker plans. You can learn more about Podia's plans on our pricing page!
Before we begin, a quick heads up...
These settings require some technical knowledge and can be intimidating. Using this feature incorrectly could potentially break your Podia site.
Note: While we’re happy to help with any issues taking place on our end, we aren’t able to access your accounts with those other tools, which limits the support we can offer.
We encourage reaching out directly to the third-party tools for help getting them working.
JavaScript Objects
Customer Object
Every page on your Podia site has access to a Podia.Customer object, which represents the currently logged-in customer.
Available attributes
idemailfirst_namelast_namestripe_idcreated_at
Example object
{
id: 7,
email: "[email protected]",
first_name: "James",
last_name: "Bond",
stripe_id: "cus_X007",
created_at: 1518554863241
}Notes
first_nameandlast_namewill be null if the customer hasn't provided them.stripe_idis the Stripe customer idcreated_atrepresents when the customer initially signed up as a UNIX timestamp (integer). If necessary, it can be used to construct a native Date object like so:var signupDate = new Date(Podia.Customer.created_at);Podia.Customerwill benullif there is no customer currently logged in. It's a good idea to first check for the existence of a customer before attempting to access attributes. For example:
if(Podia.Customer) {
console.log(`Customer email is ${Podia.Customer.email}.`);
console.log(`Signed up ${new Date(Podia.Customer.created_at)}.`);
} else {
console.log('No customer logged-in.');
}Conversion Object
A Podia.Conversion object is available after a customer purchases a course, product, or membership subscription (both free and paid). This object is only available on the thank-you pages after checkout, and will only appear once — the Podia.Conversion object disappears if the thank-you page is refreshed to prevent duplicate tracking.
Available attributes
customerrevenue_centsrevenuecurrencyobject
Notes
customeris aPodia.Customeras described above.revenue_centswill be0for free products and membership plans.revenueis a decimal (dollar and cents) representation of revenue.currencyis the ISO code of the currencyrevenue_centsis denominated in.objectis the product or subscription that was purchased, detailed below.
Available attributes for object
typeThe type of conversion that occurred. It's going to be marked asproductfor any of the product types on Podia - such as online courses, digital downloads, community plans, etc.idThe unique ID for the product or membership plan (i.e. SKU).nameThe name of the product or membership plan that was purchased.order_idThe unique ID for this order or subscription (i.e. transaction ID).
Example product purchase
{
customer: {
id: 7,
email: "[email protected]",
first_name: "James",
last_name: "Bond",
stripe_id: "cus_X007",
created_at: 1518554863241
}, revenue_cents: 49500,
revenue: 495.00,
currency: 'USD', object: {
type: 'product',
id: 12345,
name: "Design For Developers",
order_id: 90210
},
}
Finishing up
We recommend that you disable any ad-blockers and use private browsing (incognito mode) when testing your custom JavaScript integration.
And remember, the Podia.Conversion object is only available immediately following a conversion and disappears on the next page request.
FAQs
Can I use Meta’s Conversions API with my Meta Pixel?
Can I use Meta’s Conversions API with my Meta Pixel?
Yes.
If you’re sending events to Meta from your own server (using Meta’s Conversions API, Google Tag Manager, or a custom integration) and you’re also using Podia’s built-in Meta Pixel integration, Meta may receive the same event twice.
To prevent duplicate tracking, Meta uses an event ID to determine whether two events represent the same action.
You can learn more about how Meta deduplicates Pixel and Conversions API events in Meta’s documentation: https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events/
Podia automatically includes an event ID with the Meta Pixel events it sends.
If you’re sending the same events to Meta through your own server-side setup, you can use that same ID as the event_id in your Conversions API event to help Meta deduplicate the events.
How do I access the event ID?
You can access the event ID using Podia’s JavaScript tracking events.
Purchase events
document.addEventListener("podia:checkout:purchase", (event) => { const eventId = event.detail.id; });The same purchase ID is also available on the thank-you page as:
Podia.Conversion.object.order_id
Add to cart events
document.addEventListener("podia:checkout:start", (event) => { const eventId = event.detail.id; });Customer signups (CompleteRegistration)
document.addEventListener("podia:customer:signup", (event) => { const eventId = event.detail.customer.id; });The customer’s ID is also available as:
Podia.Customer.id
Important
For purchase events, use Podia.Conversion.object.order_id (or event.detail.id from the podia:checkout:purchase event) as your Meta event_id.
Do not use Podia.Conversion.object.id, as that value refers to the product ID rather than the purchase itself.
Do I need to do anything if I’m only using Podia’s Meta Pixel?
No.
If you’re only using Podia’s built-in Meta Pixel integration, no action is required. Your pixel will continue working as normal.
This information is only relevant if you’re also sending the same events to Meta through your own server-side tracking setup and want Meta to deduplicate those events.
