BranchMetrics / web-branch-deep-linking-attribution

The Branch Web SDK for deep linking and attribution. Once initialized, the Branch Web SDK allows you to create and share links with a banner (web only), over SMS, or your own methods by generating deep links. It also offers event tracking, access to referrals, and management of credits.
https://help.branch.io/developers-hub/docs/web-sdk-overview
MIT License
288 stars 101 forks source link

JRNYS-44-update: Reducing CLS scores to 0 #776

Closed wwest-branch closed 3 years ago

wwest-branch commented 3 years ago

Steps to get CLS score to 0.

  1. Removed marginTop and marginBottom on body as that was causing a shift in the layout.
  2. Applied transform property to the body to handle the visual shift (done by animation and not by actually moving elements around in the DOM)
  3. Removed setting the iframe position to top = 0px as that was causing an additional reposition of the banner that caused an increase in the CLS score.

@yli-branch Feel free to chime in or modify anything above. Thanks!

aaaronlopez commented 3 years ago

otherwise, lgtm 👍