-
Enhancing AB Testing Reporting in GA4 Data API
Alright folks, let me lay down the situation. I’m trying to put together this cool setup in GA4 revolving around AB Testing without diving into the deep end of user_scope dimensions and those tricky swimlanes.
Currently I’ve got
gtag('event', 'experiment', { exp_bucket });
being fired and configured as an event dimension. Pretty neat, I can gaze upon this data in all its glory in the Custom Explore UI. However, problem arises when I try to recreate this User segment or even another view in the GA4 Beta Data API. I end up getting a good for nothing set of User Totals, Event Counts and 0’s for funnel steps! Like, what the?makeRequest(
https://analyticsdata.googleapis.com/v1beta/properties/<span class="hljs-subst">${propertyId}</span>:runReport
, { dateRanges: [{ startDate: '2023-03-20', endDate: 'today' }], dimensions: [{ name:customEvent:exp_bucket
}], metrics: [ { name: 'totalUsers' }, { name: 'newUsers' }, { name: 'bounceRate' }, { name: 'addToCarts' }, { name: 'checkouts' }, { name: 'totalRevenue' }, { name: 'totalPurchasers' }, { name: 'ecommercePurchases' }, { name: 'firstTimePurchaserConversionRate' }, { name: 'averagePurchaseRevenuePerPayingUser' }, ], });Below is snapshot of what I mean – note the event scoped dimension report.
Now the burning question is, can I adjust my data pull? Or possibly consider changing something in the event or dimension architecture? Currently, I’m thinking of creating like “ab_test_lane_[1|2|3|4|5]” as a user dimension and mapping each active experiment into a lane. But then, I’ve got the headache caused by the complexity of mapping live experiments to solitary lanes to ward off any conflicts. Any ideas guys?
Log in to reply.