Skip to content

feat: improve carousel track events #14877

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vinnyhoward
Copy link
Contributor

Description

Issue: We need more rich MetaMetrics data for carousel interactions to provide better analytics for teams.

Solution: Enhanced MetaMetrics implementation in the Carousel component by:

  1. Improved navigation tracking between slides
  2. Added proper debouncing for swipe events to prevent duplicate tracking
  3. Optimized event tracking logic to avoid unnecessary events
  4. Standardized event properties across all carousel interactions

Key changes:

  • Implemented proper debounced navigation tracking for swipe gestures
  • Removed redundant banner display tracking from render function
  • Improved event property consistency across all carousel events
  • Added test coverage for all tracking scenarios

Related issues

Fixes: 4038

Manual testing steps

  1. Open the wallet home page
  2. Interact with the carousel in different ways:
    • Swipe between slides
    • Click on banners
    • Close banners
  3. Verify the following events are tracked correctly:
    • CAROUSEL_BANNER_NAVIGATE - When swiping between slides
    • CAROUSEL_BANNER_CLICKED - When clicking a banner
    • CAROUSEL_BANNER_CLOSE_ALL - When closing the last visible banner

Screenshots/Recordings

Before

Events were inconsistent and sometimes duplicated:

{
  "name": "CAROUSEL_BANNER_DISPLAYED",
  "properties": { "bannerName": "card" }
}

After

{
  "name": "CAROUSEL_BANNER_NAVIGATE",
  "properties": {
    "from_banner": "card",
    "to_banner": "fund",
    "navigation_method": "swipe"
  }
}

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@vinnyhoward vinnyhoward requested a review from a team as a code owner April 25, 2025 04:17
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@vinnyhoward vinnyhoward added team-wallet-ux Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 28, 2025
Copy link
Contributor

github-actions bot commented Apr 28, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 55a6e19
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8b78ce4a-b020-45f1-8344-67bf7e1ada71

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@vinnyhoward vinnyhoward added the No QA Needed Apply this label when your PR does not need any QA effort. label Apr 28, 2025
@vinnyhoward vinnyhoward added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 29, 2025
Copy link
Contributor

github-actions bot commented Apr 29, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 8f497f1
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/35f92e5d-ecb4-480c-8fcf-e0787b02b870

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No QA Needed Apply this label when your PR does not need any QA effort. Run Smoke E2E Triggers smoke e2e on Bitrise team-wallet-ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant