# GTM参数未被保存或传递给GTM

**URL:** <https://meta.discourse.org/t/gtm-parameters-are-not-preserved-or-passed-to-gtm/307240>\
**Category:** Product Support\
**Created:** [2024 年5 月 8 日 11:44 UTC](https://meta.discourse.org/t/gtm-parameters-are-not-preserved-or-passed-to-gtm/307240 "2024-05-08T11:44:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

作者： ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
发布日期： [2024 年5 月 9 日 18:52 UTC](https://meta.discourse.org/t/gtm-parameters-are-not-preserved-or-passed-to-gtm/307240/3 "2024-05-09T18:52:02Z")

</div>

嗯，不，那是不同的东西。

我刚发现这是 `stable` 上的一个问题，  
我还发现（在 stable 上）_某些_ 参数被保留了，比如 `pp`、`safe_mode` 等。但我找不到这些参数的定义位置或如何添加它们。

在 tests-passed 上，所有查询参数都保留了，所以总结一下：

- 如果我访问 [https://stable.example.com/?pp=1&utm\_source=foo，路由器会将其重写为](https://stable.example.com/?pp=1&utm_source=foo%EF%BC%8C%E8%B7%AF%E7%94%B1%E5%99%A8%E4%BC%9A%E5%B0%86%E5%85%B6%E9%87%8D%E5%86%99%E4%B8%BA) [https://stable.example.com/?pp=1（因为](https://stable.example.com/?pp=1%EF%BC%88%E5%9B%A0%E4%B8%BA) `pp` 显然是白名单中的）
- 如果我访问 [https://testspassed.example.com/?pp=1&utm\_source=foo，两个参数都会保留。](https://testspassed.example.com/?pp=1&utm_source=foo%EF%BC%8C%E4%B8%A4%E4%B8%AA%E5%8F%82%E6%95%B0%E9%83%BD%E4%BC%9A%E4%BF%9D%E7%95%99%E3%80%82)

……然后我发现了[这个](https://github.com/discourse/discourse/commit/4f75cee6d2e1184159c0c13983e26fe357d0d2f4)修复。

有没有可能将其反向移植到 stable？看起来它没有任何依赖项，所以应该是安全的。

---

_[View the full topic](https://meta.discourse.org/t/gtm-parameters-are-not-preserved-or-passed-to-gtm/307240)._
