Skip to content

Load DAP analytics script asynchronously#8989

Merged
aduth merged 1 commit intomainfrom
aduth-dap-async
Aug 11, 2023
Merged

Load DAP analytics script asynchronously#8989
aduth merged 1 commit intomainfrom
aduth-dap-async

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Aug 11, 2023

🛠 Summary of changes

Updates DAP script load to occur asynchronously.

Why?

  • This is how it's documented to be implemented
  • Allows the script to load asynchronously to avoid page-load blocking (documentation)

📜 Testing Plan

  1. Add participate_in_dap: true to config/application.yml
  2. Start server
  3. Go to http://localhost:3000
  4. Verify no errors in load†

† There's currently a CSP error related to GA4 migration that may need to be addressed, but is expected to be harmless currently due to the described "dual tracking" at the link above.

changelog: Internal, Performance, Load analytics script asynchronously to improve page load
@aduth aduth requested a review from mitchellhenke August 11, 2023 18:02
@aduth aduth merged commit 83fe556 into main Aug 11, 2023
@aduth aduth deleted the aduth-dap-async branch August 11, 2023 18:37
@jmdembe jmdembe mentioned this pull request Aug 15, 2023
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.

2 participants