Skip to content
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

Checkout event improvements #813

Merged
merged 10 commits into from
Aug 22, 2019
Merged

Checkout event improvements #813

merged 10 commits into from
Aug 22, 2019

Conversation

cdolm92
Copy link
Contributor

@cdolm92 cdolm92 commented Aug 22, 2019

πŸ“² What

Improvements to monitoring user behavior for v1 checkout.

πŸ€” Why

We now have events for:

  • Select Reward Button Clicked
  • Manage Pledge Button Clicked
  • View Rewards Button Clicked
  • View Your Pledge Button Clicked
  • Fix Pledge Button Clicked

We also renamed Project Page Viewed event to Project Page

βœ… Acceptance criteria

  • Turn on the KOALA_TRACKING environment variable in the scheme. Then launch the app and navigate to a project. You should see the Back this project CTA, tap it. You should see an event -"Back this Project Button Clicked" in the console.
  • Launch the app and navigate to a backed and live project. You should see the Manage CTA, tap it. You should see an event "Manage Pledge Button Clicked" in the console.
  • Launch the app and navigate to a backed and non-live project. You should see the View Your Pledge CTA, tap it. You should see an event "View your pledge Button Clicked" in the console.
  • Launch the app and navigate to a non-backed and non-live project. You should see the View rewards CTA, tap it. You should see an event "View Your Pledge Button Clicked" in the console.

Copy link
Contributor

@ifbarrera ifbarrera left a comment

Choose a reason for hiding this comment

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

This is looking good! I think we could a few more tests to make sure we've covered everything.

@@ -475,7 +475,7 @@ final class KoalaTests: TestCase {

let koala = Koala(client: client, loggedInUser: loggedInUser)

koala.trackBackThisButtonClicked(project: project, screen: .projectPage)
koala.trackBackThisButtonClicked(stateType: .pledge, project: project, screen: .projectPage)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add tests for the other cases of PledgeStateCTAType?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, will do!

@@ -167,4 +169,19 @@ internal final class PledgeCTAContainerViewViewModelTests: TestCase {
self.vm.inputs.configureWith(value: (.right(.couldNotParseJSON), false))
self.pledgeRetryButtonIsHidden.assertValues([true, false])
}

func testNotifyDelegateCTATapped() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a test to verify that tapping the button triggers the events in Koala?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, will do!

@cdolm92 cdolm92 requested a review from ifbarrera August 22, 2019 22:19
@cdolm92 cdolm92 merged commit f95ac7d into master Aug 22, 2019
@cdolm92 cdolm92 deleted the checkout-event-improvements branch August 22, 2019 22:44
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.

None yet

2 participants