Skip to content

LG-8754 Persist AB testing values in session WIP#7750

Closed
jess-fortier wants to merge 8 commits intomainfrom
jess/LG-8754-revise-ab-test-logging
Closed

LG-8754 Persist AB testing values in session WIP#7750
jess-fortier wants to merge 8 commits intomainfrom
jess/LG-8754-revise-ab-test-logging

Conversation

@jess-fortier
Copy link
Contributor

@jess-fortier jess-fortier commented Feb 1, 2023

LG-8754

🛠 Summary of changes

  • Change event on IPP CTA load

    • from Frontend: IdV: IPP CTA Variant A / Frontend: IdV: IPP CTA Variant B / Frontend: IdV: IPP CTA Variant C
    • to IdV: IPP CTA Variant Displayed
  • Store variant data in session and surface it in future logged events as:

{
     "name": <event name>
          "properties":{
               ...
               "test_data":{
                    "ipp_cta_variant":<variant bucket name>
               }
               ...
          }
     ...
}
  • Update existing analytics tests to accommodate the new session entry @session[test_data]

📜 Testing Plan

LG-8754 Test Plan

# @param [Hash] variant The IPP CTA Variant that was shown to the user
# The user was shown a variant of the IPP CTA
def idv_ipp_cta_variant(variant:, **extra)
preserve_testing_value({ ipp_cta_variant: variant })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very skeptical of putting this side effect here. Again, the only purpose of this file is to provide some static definitons we can generate documentation from, I think it would be clearer to move this logic up to the call sites

Take a look at #7685 as an example of removing event-specific side effects.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was struggling with the best way to persist a value in session from the doc auth React flow. Could I put some time on your calendar to discuss?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup! Go for it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we assign the A/B test bucket to the session before the page is loaded. And then if we need to add that to events for in-person proofing, we could use the existing Idv::AnalyticsEventsEnhancer class to add the variant in dynamically to every event for the in-person flow, since it was designed to add common details to all IPP events.

@jess-fortier jess-fortier marked this pull request as ready for review February 3, 2023 18:08
preserve_testing_value({ ipp_cta_variant: variant })
track_event(
'IdV: IPP CTA Variant Displayed',
**extra,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**extra,
variant: variant,
**extra,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants