Hi, I am trying to setup ecommerce tracking with google analytics. I am able detect successful bookings when the ‘thank you’ page is loaded. However, I would also like to pass on the transaction IDs, event names, ticket prices and number of tickets to the purchase event in GA, like in this example: https://developers.google.com/analytics/devguides/collection/gtagjs/ecommerce
Where can I find which variables to use for these? So far I found $transaction->total and $registration->event_name on the thank-you page templates.
How you get the EE_Transaction object depends on how your adding this code, there are hooks on the thank you page that are passed that object, for example:
I’d recommend using the Kint Debugger plugin then hooking into the above and using d($transaction); to view all of the available properties and methods you can run to pull the details you need from that object.
Viewing 1 reply thread
The support post ‘Tracking Bookings with Google Analytics’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.