Replies: 1 comment 3 replies
|
For 1., I'd be worried that we artificially create INP with that approach. If you start loading a large martech as the user scrolls and/or clicks, it's likely to cause TBT and INP. For 2. I'd argue that consent only applies to the martech stack and I've seen other stuff loaded in the delayed phase so I would not want to block those scripts. Also, some of the martech is not subject to cookie consent (as they have proper fallbacks in place). To me that would be a breaking change. I would propose:
Alternatively, for the user interaction approach, then I'd at least make sure to fire with |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Two competing draft PRs propose different approaches to
delayed.jsloading. Themainbranch still uses a 3-second timeout.Key context: @davidnuescheler (author of both) explicitly stated these are "competing approaches."
Current Implementation
Simple 3-second delay after lazy content loads. Projects extend
delayed.jsfor analytics/marketing tech.PR #408: Interaction-Triggered
PR | Demo | @davidnuescheler | Oct 2024
Loads
delayed.json first user interaction instead of timeout. Listens for scroll, click, touchstart, keydown, and mousemove events.Review highlights:
delayedflow to include consent #376 firstdelayedflow to include consent #376 lands, traditional loading may still be used"delayedflow to include consent #376) also wait for interaction?PR #376: Consent-Based
PR | Demo | @davidnuescheler | Jun 2024
Replaces delayed loading with consent-gated loading. Marketing tech waits for explicit user consent.
Adds:
scripts/consent.jswithhandleConsent()functionaem:consentchangeevent systemOpen issues:
aem:changeconsentvsaem:consentchangeDecision Framework
The choice depends on boilerplate philosophy:
Hybrid concept:
Recommendation
delayedflow to include consent #376 as a project-level pattern — consent requirements vary by region/industry; too opinionated for boilerplate core.All reactions