jQuery being loaded into gtm.js from Google Tag Ma

2019-03-31 13:07发布

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?

1条回答
做个烂人
2楼-- · 2019-03-31 13:25

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)

查看更多
登录 后发表回答