有没有办法将完整的 GTM 设置从普通站点迁移到 SPA?

Is there any way to migrate a full GTM setup from a normal site to a SPA?

我很害怕不得不在 backbone 事件中重做 Google 的 GTM 中所做的所有工作 :) 我看到 angular 有一些帮助程序允许分析和跟踪器在 SPA 中工作,但即使是新安装也是如此。我什至不 angular.

有没有办法让 GTM 在 Backbone 中的历史记录发生变化时刷新?就像各种硬重装 :D

您可能需要对触发器进行一些返工,但如果您使用 history change triggers:

,您可能只需要这样做

Triggers based on the History Change event will fire a tag when the URL fragment (hash) changes or when a site is using the HTML5 pushstate APIs.