adopted-ember-addons / adopted-ember-addons/ember-metrics
Why does the GTM adapter rewrite top-level event schema in trackEvent?
- Lenguaje dominante
- TypeScript
- Estrellas
- 367
- Forks
- 158
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I'm referencing [this block here](https://github.com/adopted-ember-addons/ember-metrics/blob/master/addon/metrics-adapters/google-tag-manager.js#L52-L55). All the top-level keys are rewritten with the prefix `event`. This breaks Enhanced Ecommerce tracking as it looks for the `ecommerce` key specifically.
Obviously I can easily override the adapter to not do this, but I'm wondering if there's even a good reason to do it in the first place. It seems like, all things being equal, the adapter should just write the schema I told it I wanted. As far as I can tell the code has been there since the introduction of the adapter and there was no explanation for it in the relevant PR.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.