可以在 GTM 中移动 Wordpress 插件吗?

Can Wordpress plugins be moved inside GTM?

我有一个网站,其中有 google 标签管理器和一些 WordPress 插件。由于一些监管政策,我被告知要移动 gtm 中插件加载的所有脚本。是否真的可以在 GTM 中移动 Jetpack 和社交共享应用程序等插件?

"Google Tag Manager is an asynchronous tag, meaning that when it executes, it does not block other elements from rendering on the page. It also causes the other tags that are deployed via Google Tag Manager to be deployed asynchronously, meaning that a slow loading tag won’t block other tracking tags."

请仔细阅读此文档:Read More , Read More

目前的答案是 "no",您不能将 Wordpress 插件移动到 GTM。 Wordpress 是服务器上的 PHP 应用程序 运行,GTM 是注入 Javascript 的第三方服务。 GTM可以做你在Javascript能做的任何事情,不需要在服务器端命令,所以两者没有可比性

不过,如果它完全基于 javascript,您也许可以复制 GTM 中插件的某些功能。一些 WP 插件只是加载一个 JS 库以在前端启用共享等,这是您可以通过 GTM 执行的操作(尽管您肯定无法以这种方式复制 Jetpack)。

因此,您的插件执行的某些特定子集可能可以通过 GTM 复制,但总而言之,GTM 不能替代您的 WP 插件。