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

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

オープン
#438 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
367
フォーク
158
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with addon/metrics-adapters/google-tag-manager.js at lines 52-55 and inspect the surrounding trackEvent behavior and its history. Confirm why top-level keys receive the event prefix and define the expected Enhanced Ecommerce schema, with the work complete when that behavior and its intended result are clear.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
analytics
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。