adopted-ember-addons / adopted-ember-addons/ember-metrics

Why does the GTM adapter rewrite top-level event schema in trackEvent?

Abierto
#438 5 comentarios 0 reacciones 0 asignados Ver en GitHub
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

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.