Remove ATB params from email pixels #1354
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Task/Issue URL: https://app.asana.com/0/414730916066338/1200714585958657/f
Tech Design URL:
CC:
Description:
All our pixels currently send the ATB as a parameter but some pixels should not send such information, for instance
EMAIL_TOOLTIP_DISMISSED,EMAIL_USE_ALIAS,, EMAIL_USE_ADDRESS.This PR:
PixelAtbRemovalInterceptorthat is added to the pixelokHttpinstance that will redact theatbparameter from the pixel if necessaryokHttpinstance that just logs the finalrequesturl that is sent so that we can easily check in the console in debug buildstimbersthat logged the pixel params etc, but as we are modifying the request using an interceptor, those timber may not contain the request params that are actually going outPixelAtbRemovalInterceptorTestthat verifies that for all pixels inAppPixelNameonly contain theatbparam those which are supposse toSteps to test this PR:
Pixel url request:Pixel url request: https://improving.duckduckgo.com/t/m_e_t_d_android_phone?appVersion=5.92.1&cohort=internal_beta&test=1appears in logcatm_e_t_dandatbparam is not in urlUser yourEmail@duck.comPixel url request: https://improving.duckduckgo.com/t/m_e_uad_android_phone?appVersion=5.92.1&cohort=internal_beta&test=1appears in logcatm_e_uadandatbparam is not in urlGenerate private addressPixel url request: https://improving.duckduckgo.com/t/m_e_ua_android_phone?appVersion=5.92.1&cohort=internal_beta&test=1appears in logcatm_e_uaandatbparam is not in urlIf you remove the
PixelAtbRemovalInterceptorform the okHttp instance and perform the test steps above, all three pixels should have theatbparamThe
PixelAtbRemovalInterceptorTestshould ensure that no other pixel is affected by this changeInternal references:
Software Engineering Expectations
Technical Design Template