• Thomas

    12 June 2023 at 12:50 pm

    When using event-scoped dimensions, as in your case with exp_bucket, Google Analytics 4 executes queries at the event level rather than user level. This difference would explain why your user-total and funnel step data appears as 0.

    A possible solution could be to redefine your dimensions as user-scoped. This can be achieved by storing the exp_bucket value in a user property when the experiment event is fired. Then, you can use this user property as the dimension in your reports, which would be a workaround for your current issue with user totals returning as zero.

    Another way to handle this is by redefining your data pull to accommodate a user-level analysis. That means changing your dimensions attribute to something like dimensions: [{ name: 'userPseudoId' }], and then grouping by the exp_bucket column in your results.

    Remember that it’s important to use the appropriate scope (event or user) for your analysis as both have somewhat different use cases. User-scoped dimensions would be more suitable for cumulative data across all the user sessions, while event-scoped dimensions would be more appropriate for data related to individual sessions or page views.

    Regarding the idea of creating “ab_test_lane_[1|2|3|4|5]”, consider the scale of your implementation. If you have enough lanes that mapping won’t be an issue and the experiment configurations don’t overlap, this could work. However, you’ll need to ensure that all future experiments are carefully mapped to the correct lane to avoid conflict, which could be a complex and error-prone task.