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

MWPW-163684 Set trial limit and show upsell #938

Merged
merged 5 commits into from
Jan 13, 2025
Merged

MWPW-163684 Set trial limit and show upsell #938

merged 5 commits into from
Jan 13, 2025

Conversation

TsayAdobe
Copy link
Collaborator

It's the first part of the story. Social CTA will be added later after SUSI light block is done.

Resolve: MWPW-163684

Test URLs
Before: https://www.stage.adobe.com/acrobat/online/test/compress-pdf.html
After: https://mwpw-163684--dc--adobecom.hlx.page/acrobat/online/test/compress-pdf?unitylibs=stage

Copy link

aem-code-sync bot commented Jan 9, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Jan 9, 2025

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 4.25532% with 45 lines in your changes missing coverage. Please review.

Project coverage is 80.06%. Comparing base (8045c37) to head (5a0e6e0).

Files with missing lines Patch % Lines
acrobat/blocks/verb-widget/verb-widget.js 2.17% 45 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            stage     #938      +/-   ##
==========================================
- Coverage   80.60%   80.06%   -0.55%     
==========================================
  Files          49       49              
  Lines        6513     6560      +47     
==========================================
+ Hits         5250     5252       +2     
- Misses       1263     1308      +45     

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

@@ -205,6 +236,14 @@ export default async function init(element) {
// Analytics
verbAnalytics('landing:shown', VERB);

if (LIMITS[VERB].trial) {
const count = parseInt(localStorage.getItem(`${VERB}_trial`), 10);
if (count >= LIMITS[VERB].trial) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If I'm understanding this correctly, this logic would show the upsell screen even on the 2nd attempt since it's using >=. Would trial need to be updated to 3 in the limits.js file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

1st trial, count = NaN, after uploading, the local storage = 1.
2nd trial, count = 1, after uploading, the local storage = 2.
3rd attempt, count = 2, count >= LIMITS[VERB].trial

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah that makes sense, thanks for clarifying!

@TsayAdobe TsayAdobe merged commit 1e9f4dd into stage Jan 13, 2025
7 of 8 checks passed
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.

4 participants