Cloudfare Rocket loader breaking the GTM datalayer scripts
-
When enabling cloud fare the rocket loader for scripts, GTM is throwing the “jQuery” not found error message in console.
Reason for issue:
Rocket loading will load the combined scripts (All .js files) after the loading of HTML Dom and GTM is using the inline jQuery dependable scripts for datalayer handling.Suggestion:
1. using core javascript instead of jQuery
2. output the datalayer related scripts into separate js file and using the script localization for passing the data.
- The topic ‘Cloudfare Rocket loader breaking the GTM datalayer scripts’ is closed to new replies.