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

feat(safe-apps): Analytics refactor #1042

Merged
merged 9 commits into from
Nov 7, 2022
Merged

feat(safe-apps): Analytics refactor #1042

merged 9 commits into from
Nov 7, 2022

Conversation

yagopv
Copy link
Member

@yagopv yagopv commented Nov 3, 2022

What it solves

This PR add a refactor to the Safe Apps analytics current behavior as part of the analytics epic

How this PR fixes it

We are making changes to reflect the status described here

How to test it

We need to validate all the event actions described here are being sent

@JagoFigueroa the preference is validate this using GTM and GA4 tools. We can align on this

Analytics changes

  • We now are sending all the analytics from Safe Apps using the concrete safeApp event or the custom pageview. Previously it was a combination of Safe App events and Safe Web Custom events with metadata category. Is easier and less prone to errors to use only the Safe App event. We now have under the safeApp event two categories (safe-apps and safe-apps-sdk)

  • We now are sending the app name always in the safeAppName diimension. If the app belongs to the default list we send the name and if not the url (custom app). Previously the dimension was only being used for SDK events and we were sending the names in the eventLabel with no clear consensus. Doing this, we know clearly if the app is known and we free a dimension (eventLabel) for include any other data

  • We send pageview events for the Safe Apps list and for the concrete app being loaded in order to generate reports as the time elapsed in Safe apps sections or apps

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@yagopv yagopv marked this pull request as ready for review November 3, 2022 09:24
@yagopv yagopv requested review from dasanra and mmv08 November 3, 2022 09:24
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 3, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c45a88d
Status: ✅  Deploy successful!
Preview URL: https://1ac8e201.web-core.pages.dev
Branch Preview URL: https://feat-safe-apps-analysis.web-core.pages.dev

View logs

</main>
<>
<Head>
<title>Safe Apps – Share</title>
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we can include the app name in the title as a future enhancement 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, we sent the app name or url (if custom) here

if (!isLoading && safeApp?.chainIds.length) {
const appName = backendApp ? backendApp.name : safeApp.url

trackSafeAppEvent(SAFE_APPS_EVENTS.SHARED_APP_LANDING, appName)
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need 2 separate events for this? Can the chainid be included in the SHARED_APP_LANDING?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, changed it. Does not make sense

@yagopv yagopv requested a review from mmv08 November 4, 2022 15:07
@yagopv yagopv merged commit 6550a7e into dev Nov 7, 2022
@yagopv yagopv deleted the feat/safe-apps-analysis branch November 7, 2022 10:49
@gitpoap-bot
Copy link

gitpoap-bot bot commented Nov 7, 2022

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2022 Safe Web Core Contributor:

GitPOAP: 2022 Safe Web Core Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@katspaugh katspaugh mentioned this pull request Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants