adopted-ember-addons / adopted-ember-addons/ember-metrics
Why does the GTM adapter rewrite top-level event schema in trackEvent?
- Ngôn ngữ chính
- TypeScript
- Star
- 367
- Fork
- 158
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- analytics
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100