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: show Beamer NPS on tx success screen #2461

Merged
merged 11 commits into from
Aug 30, 2023
Merged

feat: show Beamer NPS on tx success screen #2461

merged 11 commits into from
Aug 30, 2023

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Aug 28, 2023

What it solves

Resolves #2432

How this PR fixes it

Beamer's NPS is now shown on the transaction PROPOSED.

How to test it

Create a transaction, observing the NPS opening when the proposal succeeds.

Screenshots

Note: this is an old recording but the functionality should be the same, but on proposal.

nps

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

@github-actions
Copy link

github-actions bot commented Aug 28, 2023

Branch preview

⏳ Deploying a preview site...

@github-actions
Copy link

github-actions bot commented Aug 28, 2023

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

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

You’re on 🔥!

@iamacook iamacook marked this pull request as ready for review August 28, 2023 18:58
const lastShown = window.Beamer.getCookie(LS_KEY)

if (!lastShown) {
window.Beamer.forceShowNPS()
Copy link
Member

Choose a reason for hiding this comment

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

Can you link to Beamer docs about this fn? Why do we "force" it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Have spoken with Beamer regarding this, as well as asked some other questions. I'll make this a draft for now and include what I hear back.

Copy link
Member Author

Choose a reason for hiding this comment

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

As per our discussion, I've added comments to address this.

@iamacook iamacook marked this pull request as draft August 29, 2023 08:14
@iamacook iamacook marked this pull request as ready for review August 29, 2023 12:20
// randomly showing on pages that we don't want it to
// Note: this is not documented but confirmed by Beamer support
if (!lastShown) {
window.Beamer.forceShowNPS()
Copy link
Member

Choose a reason for hiding this comment

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

You could also unsubscribe right after.

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Code looks good.
Does it remember that a banner was shown or that it's been answered?

@iamacook
Copy link
Member Author

Code looks good. Does it remember that a banner was shown or that it's been answered?

It checks whether it was shown, matching that of their API.

I just refactored the code a little bit according to your suggestion above.

@francovenica
Copy link
Contributor

The feature is fine. The popUp shows up for the first time when you propose a transaction and then it doesn't show up anymore.
I've checked that it only happens if you have beamer enabled in the preferences

Note: A large number of users use a 1/x safes, so is likely that they only create and execute tx at the same time, so all those people will not see this beamer popup.
I know a discussion is going on in this thread in slack, so I'll keep the ticket here to wait for the response.

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

We shouldn’t show it for executions and signatures. Only for creations. Otherwise people will be rating completely different flows.

@francovenica
Copy link
Contributor

Recheck this after the last commit.

Made sure it still works only with the Beamer checkbox enabled in preferences
Creation and execution DO NOT trigger the Beamer popup as expected
Only proposing a transaction DOES trigger the beamer popup as expected
The popup doesn't show up anymore after the first time as expected

LGTM

@katspaugh katspaugh merged commit 6d7ff9b into dev Aug 30, 2023
7 of 9 checks passed
@katspaugh katspaugh deleted the beamer-nps branch August 30, 2023 13:42
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Beamer in-app survey logic
3 participants