jQuery从Google跟踪代码管理器加载到gtm.js中 [英] jQuery being loaded into gtm.js from Google Tag Manager
问题描述
我一直有一个问题,jQuery v1.9.1被包含在gtm.js文件的顶部。它会导致一些问题,并可能会使已经加载到jQuery.fn上的jQuery插件流失。回归测试也是一个问题。我查了一下,并且似乎没有加载jQuery的Google跟踪代码管理器中的任何自定义代码。
最终,我想控制加载的主机域和jQuery版本。 GTM接口中是否有配置设置或其他方式可以禁用jQuery?
我是很确定,包含在gtm.js中的jQuery代码是自定义的,并且不是全局可用的。
我做了一个快速测试,既没有 jQuery
和 $
都是在GTM片段插入页面时定义的。
( window。$
其实 是定义的,但这是一个Chrome的事情:命令行API参考)
I've been having an issue where jQuery v1.9.1 is being included into the top of the gtm.js file. It causes a few issues and can blow away jQuery plugins that are already loaded on jQuery.fn. Regression testing is also a concern. I checked and I don't appear to have any custom tags in the Google Tag Manager that loads jQuery.
Ultimately I want to have control over the host domain and version of jQuery loaded. Is there a configuration setting in the GTM interface or some other way that I can disable the inclusion of jQuery?
I'm pretty sure that the jQuery code that is included in gtm.js is customized and not globally available.
I did a quick test, and neither jQuery
nor $
are defined when I just insert the GTM snippet into a page.
(window.$
actually is defined, but that's a Chrome thing: Commandline API Reference)
这篇关于jQuery从Google跟踪代码管理器加载到gtm.js中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!