Podia Event Listener
How to track Podia User Data & Conversions with google tag manager
Tracking Podia conversions and pushing the user data into the dataLayer is possible and seamless using Google Tag Manager and the Podia event listener script on this page.
To implement this, create a custom HTML tag where you’ll paste the event listener code and fire it on pageview or DOM ready (always recommended).
The next step in this implementation is to create a custom event with the event name of [podia_conversion], which gets fired on all conversions, when a customer purchases a course, product, or membership subscription (both free and paid)
Also, an event fires on all page view in Podia, with the event name [podia_user_data], this event carries the user data in the dataLayer object [userdata], the data in the object are;
- id
- first_name
- last_name
- stripe_id
- created_at
The dataLayer [conversiondata], which is present in the Podia conversion event [podia_conversion], it’s an object data type with information about the conversion, such as;
- customer data
- revenue_cents
- revenue
- currency
- an object containing (product type, ID, product name and order ID)
You can fire your marketing tags/pixels on the conversion event [podia_conversion] that you created earlier.
Boom you are now tracking Podia conversions.
<script> // pushes the user data into dataLayer if(Podia.Customer) { window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'podia_user_data', 'userdata': Podia.Customer }); }; // when a customer purchases a course, product, or membership subscription (both free and paid) if(Podia.Conversion) { window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'podia_conversion', 'conversiondata': Podia.Conversion }); }; </script>