ampproject / ampproject/amphtml
amp-analytics: gtag vendor config rewriter payload size limitation
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
The config rewriter of the `gtag` vendor seems to have size limits.
## How do we reproduce the issue?
1. Set up `amp-analytics` with `gtag` as the `type` (``)
2. Observe that a request is made to `https://www.googletagmanager.com/gtag/amp`, which is specified as the `configRewriter` [here](https://github.com/ampproject/amphtml/blob/7ef9f7cba4b8b6e8133ad16e3105b9579f21003e/extensions/amp-analytics/0.1/vendors/gtag.json#L3)
3. In the `triggers` part of the configuration, insert enough triggers so that the payload to the above endpoint surpasses 10kB
3. Observe the request failing and and a "Error rewriting configuration" error thrown in the JS console
Contributor guide
Assessment
This issue has not been assessed yet.