Move all GA and GTM code to end of body tag #281
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.
Change description
GTM/GA loading is interfering with the YouTube API. While Google likes you to put a script tag at the top of
<head>
it is supposed to all work even in body, just means there is a bit more delay in initializing and sending data to Google, and could mean some tracking could get missed if a user bounces off the page before it completes loading. Given the use case is generallly interested users, it's probably fine.So the code is moved out of head-extra and added to body-extra. Seems to be OK, testing on devstack, but it's a little bit hard to get a good real-world use case so I'd like to try it on Tahoe Staging.
Type of change
Related issues
https://appsembler.atlassian.net/browse/ENG-97
Checklists
Development
Security
Code review