-
Notifications
You must be signed in to change notification settings - Fork 166
LG-7355 GettingStarted A/B analytics #8822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
soniaconnolly
merged 21 commits into
main
from
sonia-lg-7355-getting-started-ab-analytics
Jul 21, 2023
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4f19d8a
GettingStarted A/B test uses user uuid, not session id
soniaconnolly 8dff6ca
Prepare to remove StepUtilitiesConcern
soniaconnolly 511914b
Move StepUtilitiesConcern methods into IdvSession concern
soniaconnolly b7c5423
Replace acuant_sdk_ab_test_analytics_args with ab_test_analytics_args
soniaconnolly 6b91063
Remove unneeded ** before merge of ab_test_analytics_args
soniaconnolly 6ada06f
Remove unneeded native_camera_ab_testing_variables method from hybrid…
soniaconnolly fd2ff9f
Add specs for AbTestAnalyticsConcern and then mock in controller specs
soniaconnolly cfc9bed
Update analytics_spec with getting started analytics bucket
soniaconnolly 6d4ae6d
Rename getting_started_a_b_test_bucket to getting_started_ab_test_buc…
soniaconnolly 18a5cd3
Collect ab test analytics methods in AbTestAnalyticsConcern rather th…
soniaconnolly b767285
lint
soniaconnolly 1794b96
Revert "Collect ab test analytics methods in AbTestAnalyticsConcern r…
soniaconnolly e83e961
Rename ab_test_analytics_args to ab_test_analytics_buckets
soniaconnolly 545fd57
Get uuid from document_capture_user in hybrid flow
soniaconnolly 37ac56c
Add a/b test bucket info to analytics for GettingStarted, Welcome, Ag…
soniaconnolly e1cbc3d
Add A/B test buckets to verify proofing results analytics
soniaconnolly 61ad822
Clean up getting_started_ab_test_concern_spec
soniaconnolly a44cc61
Extract method to choose document_capture_user or current_user to mak…
soniaconnolly 64fd4f1
Add ab test analytics to review_controller visited and submitted events
soniaconnolly 4c329c8
Fix analytics_spec for review events
soniaconnolly 7d2323f
Merge remote-tracking branch 'origin/main' into sonia-lg-7355-getting…
soniaconnolly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| module Idv | ||
| module AbTestAnalyticsConcern | ||
| include AcuantConcern | ||
| include Idv::GettingStartedAbTestConcern | ||
|
|
||
| def ab_test_analytics_buckets | ||
| acuant_sdk_ab_test_analytics_args. | ||
| merge(getting_started_ab_test_analytics_bucket) | ||
| end | ||
| end | ||
| end | ||
21 changes: 18 additions & 3 deletions
21
app/controllers/concerns/idv/getting_started_ab_test_concern.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,28 @@ | ||
| module Idv | ||
| module GettingStartedAbTestConcern | ||
| def getting_started_a_b_test_bucket | ||
| AbTests::IDV_GETTING_STARTED.bucket(sp_session[:request_id] || session.id) | ||
| def getting_started_ab_test_bucket | ||
| AbTests::IDV_GETTING_STARTED.bucket(getting_started_user.uuid) | ||
| end | ||
|
|
||
| def getting_started_user | ||
| if defined?(document_capture_user) # hybrid flow | ||
| document_capture_user | ||
| else | ||
| current_user | ||
| end | ||
| end | ||
|
|
||
| def maybe_redirect_for_getting_started_ab_test | ||
| return if getting_started_a_b_test_bucket != :getting_started | ||
| return if getting_started_ab_test_bucket != :getting_started | ||
|
|
||
| redirect_to idv_getting_started_url | ||
| end | ||
|
|
||
| def getting_started_ab_test_analytics_bucket | ||
| { | ||
| getting_started_ab_test_bucket: | ||
| getting_started_ab_test_bucket, | ||
| } | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I start getting a little nervous when I see a concern the includes a concern that includes a concern.
I'm thinking through whether there is some way for us to flatten this out into an A/B test concern that includes methods for each of the A/B tests we are performing and the tooling for logging them 🤔. That helps to make the rabbit a little more shallow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could put just the analytics methods in here and not include the rest of the concern. I started that way and then thought this might be neater.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That didn't work out at all! I think we'd have to combine all the code for the A/B tests in one Concern, like you said, and that doesn't seem great either.