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

fix: add Referer to Dapp Viewed events #8991

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

NicolasMassart
Copy link
Contributor

@NicolasMassart NicolasMassart commented Mar 19, 2024

Description

  • add Referrer to Dapp Viewed events
  • update unit test
  • fix unit test names according to guidelines for consistency with new test

Related issues

Fixes https://github.com/MetaMask/mobile-planning/issues/1601

Manual testing steps

Feature: Send Dapp Viewed with Referrer

  Scenario: Open dapp from in app browser
    Given the app is installed and setup
    And user goes into in app browser
    And user loads a dapp (must be a dapp you can connect with your wallet like https://portfolio.metamask.io/)
  
    When user connects dapp to Metamask
    And approves connection
  
    Then `Dapp Viewed` event is sent to Mixpanel
    And has `Referrer` property filled with the domain scheme+name, example https://portfolio.metamask.io/

  Scenario: Open dapp from external browser
    Given the app is installed and setup
    And user goes into external browser
    And user loads a dapp (must be a dapp you can connect with your wallet like https://portfolio.metamask.io/)
  
    When user connects dapp to Metamask using WalletConnect
    And approves connection
  
    Then `Dapp Viewed` event is sent to Mixpanel
    And has `Referrer` property filled with the domain scheme+name, example https://portfolio.metamask.io/

Screenshots/Recordings

Before

image

After

image

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

update unit test
fix unit test names according to guidelines
@NicolasMassart NicolasMassart requested a review from a team as a code owner March 19, 2024 12:16
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.

@NicolasMassart NicolasMassart self-assigned this Mar 19, 2024
@NicolasMassart NicolasMassart added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-platform labels Mar 19, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.75%. Comparing base (9739816) to head (9e11f8b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8991   +/-   ##
=======================================
  Coverage   43.75%   43.75%           
=======================================
  Files        1273     1273           
  Lines       31113    31113           
  Branches     3165     3165           
=======================================
  Hits        13612    13612           
  Misses      16688    16688           
  Partials      813      813           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Mar 19, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@sethkfman sethkfman requested a review from Cal-L March 19, 2024 15:17
Copy link
Contributor

@MarioAslau MarioAslau left a comment

Choose a reason for hiding this comment

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

Looks great @NicolasMassart ! Thank you for the context

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Let's wait for @gauthierpetetin to confirm

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@NicolasMassart NicolasMassart merged commit 644d95b into main Mar 19, 2024
43 of 44 checks passed
@NicolasMassart NicolasMassart deleted the fix/1601_dapp_viewed_evvent_url branch March 19, 2024 17:32
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 19, 2024
@metamaskbot metamaskbot added the release-7.20.0 Issue or pull request that will be included in release 7.20.0 label Mar 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.20.0 Issue or pull request that will be included in release 7.20.0 team-mobile-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants