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.
