Some CMS’s are not built with a global top <body> include (only a global header or footer include) or there is a need to do a like-for-like replacement of GA in the header for GTM in the header. Thus, here are some possible alternatives…
Existing GA setup:
GTM setup options:
1. DataLayer in <head> and GTM in top <body> (2 include files) – recommended option:
2. Both DataLayer & GTM in top <body> (1 include file) – second best option:
- Google Webmaster Tools verification only works in option1.
- For option3: GTM team does not test GTM in <head> thus there is no guarantee that it will continue to work the future.