Skip to content

Conversation

@marcosholgado
Copy link
Contributor

@marcosholgado marcosholgado commented Jan 29, 2020

#679 has to be merged first

Task/Issue URL: https://app.asana.com/0/1125189844152671/1154748750174829 and https://app.asana.com/0/1125189844152671/1158928566141343
Tech Design URL:
CC:

Description:
Some of the code for each CTA was duplicated and it seemed the logic could be extracted to a different class. This PR introduces a new cta helper that does that job previously done on each CTA.
It also addresses an issue with the cta pixels sent so we don't send any days greater than 3.
Lastly it fixes an issue where the pixel for the bubble ctas were not being sent at the right time.

NOTE: Currently the PR tries to merge into feature/marcos/cta_new_interfaces the reason is because the branch is based on that one and to avoid having changes here that are part of a different PR. Once the other PR gets merged I'll change to point to develop.

Steps to test this PR:
CTAs work as usual

  1. Use the variant me
  2. Use the app to trigger the different dialog CTAs, they should being shown as normal.

Max pixel day is 3
Change the method AppInstallStore.daysInstalled() to always return 4.

  1. Use the variant me
  2. Launch the app for the first time and go to the browser
  3. Notice how the pixel sent for the first cta has 3 as the day and not 4. i.e. m_odc_s with params: {cta=i:3}

Send pixel asap and do not sent same pixel twice

  1. Use the variant me
  2. Launch the app for the first time and go to the browser
  3. Notice how the pixel sent for the first cta is m_odc_s with params: {cta=i:1} and is sent as soon as the cta shows without having to wait.
  4. Kill the app
  5. Re-open the app
  6. Notice how the first cta shows again but the pixel m_odc_s is not sent this time.

Internal references:

Software Engineering Expectations
Technical Design Template

@marcosholgado marcosholgado marked this pull request as ready for review January 29, 2020 14:13
@subsymbolic subsymbolic self-assigned this Feb 3, 2020
…m:duckduckgo/Android into feature/marcos/cta_helper

# Conflicts:
#	app/src/androidTest/java/com/duckduckgo/app/cta/ui/CtaTest.kt
#	app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt
#	app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt
@marcosholgado marcosholgado changed the base branch from feature/marcos/cta_new_interfaces to develop February 3, 2020 12:29
Copy link
Contributor

@cmonfortep cmonfortep left a comment

Choose a reason for hiding this comment

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

A few comments, I may be missing some context and understanding of our CTAs, but hope they can help a bit. I didn't have time to test this tho. I will check again tomorrow.

@marcosholgado marcosholgado changed the title Feature/marcos/cta helper Introduce DaxCta interface Feb 4, 2020
Copy link
Contributor

@subsymbolic subsymbolic left a comment

Choose a reason for hiding this comment

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

Looks good!

@marcosholgado marcosholgado merged commit 5603bad into develop Feb 4, 2020
@marcosholgado marcosholgado deleted the feature/marcos/cta_helper branch February 4, 2020 12:45
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.

3 participants