appsembler / edx-theme-customers

Customer theme configuration and overrides
3 stars 2 forks source link

Move all GA and GTM code to end of body tag #281

Closed bryanlandia closed 1 year ago

bryanlandia commented 1 year ago

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

bryanlandia commented 1 year ago

btw, these checks never complete