Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Googleアナリティクスのトラッキング設定機能追加 #5029

Conversation

ghost
Copy link

@ghost ghost commented May 6, 2021

概要(Overview・Refs Issue)

GA4への対応が将来的に必要となるが、GAを実装しない実装はほぼ存在しない。
マーケティング部隊がいる場合は、グーグルタグマネージャーを実装することが多いがeccube co の一般的なことを考慮すると標準であっても問題ない。

方針(Policy)

###管理画面:トラッキングIDの登録
・dtb_base_infoへ「tracking_id」追加
・設定>店舗設定>基本設定へ「tracking_id」フィールド追加
・コンテンツ管理>ブロック管理へ「tracking_code.twig」追加

###フロント画面:トラッキングIDの読込み
・tracking_code.twigを作成
・default_frame.twigへ「BaseInf.tracking_id」あれば「tracking_code.twig」読込み

テスト(Test)

・管理画面:設定>店舗設定>基本設定でtracking_idの「登録・更新」
・フロント画面:「BaseInf.tracking_id」ありなしで「tracking_code.twig」読込み確認

相談(Discussion)

tracking_idのバリデーションについて
・現在MAX255のみにしている

MAX値は減らした方が良い?その場合の適正値は?
数字+ハイフンも入れた方が良いか?

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更
  • フックポイントの呼び出しタイミングの変更
  • フックポイントのパラメータの削除・データ型の変更
  • twigファイルに渡しているパラメータの削除・データ型の変更
  • Serviceクラスの公開関数の、引数の削除・データ型の変更
  • 入出力ファイル(CSVなど)のフォーマット変更

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか

@chihiro-adachi chihiro-adachi added this to the 4.1 milestone Aug 26, 2021
@chihiro-adachi chihiro-adachi added the enhancement 機能追加 label Aug 26, 2021
@chihiro-adachi chihiro-adachi modified the milestones: 4.1, 4.1.x Sep 3, 2021
@matsuoshi matsuoshi changed the base branch from 4.0 to 4.1 November 15, 2021 06:07
@matsuoshi matsuoshi modified the milestones: 4.1.x, 4.1.1 Nov 15, 2021
Copy link
Contributor

@nanasess nanasess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@refine-kenshi GitHub Actions を動かしてもらったところ、インストールできずに落ちてしまったようです。 dtb_block.csv のカラムが足りていなかったようですのでご確認お願いします

@@ -13,3 +13,4 @@
"12","10","新着情報","news","2017-03-07 10:14:52","2017-03-07 10:14:52","0","0","block"
"13","10","商品検索","search_product","2017-03-07 10:14:52","2017-03-07 10:14:52","1","0","block"
"14","10","トピック","topic","2017-03-07 10:14:52","2017-03-07 10:14:52","0","0","block"
"15","10","トラッキングコード","tracking_code","2021-05-05 00:00:00","2021-05-05 00:00:00","block"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"15","10","トラッキングコード","tracking_code","2021-05-05 00:00:00","2021-05-05 00:00:00","block"
"15","10","トラッキングコード","tracking_code","2021-05-05 00:00:00","2021-05-05 00:00:00","0","0","block"

カラムが不足しているようですのでご確認お願いします

@@ -13,3 +13,4 @@ id,device_type_id,block_name,file_name,create_date,update_date,use_controller,de
12,10,News,news,2017-03-07 10:14:52,2017-03-07 10:14:52,0,0,block
13,10,Product Search,search_product,2017-03-07 10:14:52,2017-03-07 10:14:52,1,0,block
14,10,Featured,topic,2017-03-07 10:14:52,2017-03-07 10:14:52,0,0,block
"15","10","Tracking Code","tracking_code","2021-05-05 00:00:00","2021-05-05 00:00:00","block"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"15","10","Tracking Code","tracking_code","2021-05-05 00:00:00","2021-05-05 00:00:00","block"
"15","10","Tracking Code","tracking_code","2021-05-05 00:00:00","2021-05-05 00:00:00","0","0","block"

カラムが不足しているようですのでご確認お願いします

@k-yamamura
Copy link
Contributor

この実装ですが、ブロック管理からtracking_code.twigの内容を登録すれば要件は満たされると思いますので、
https://doc4.ec-cube.net/reverse-lookup/sample-code
ドキュメントにブロック管理で追加する方法を記載するだけで良いと思います。

3系ではドキュメントとしてありました。
https://doc.ec-cube.net/design_analyticsbloc

@k-yamamura
Copy link
Contributor

追記ですがこの機能を実装されるなら、
https://support.google.com/analytics/answer/7318509?hl=ja
ここも合わせて対応するようにしてください。

@xuelian311 xuelian311 modified the milestones: 4.1.x, 4.2.3 Jul 7, 2023
@dotani1111 dotani1111 changed the base branch from 4.1 to 4.2 September 21, 2023 11:15
@dotani1111 dotani1111 modified the milestones: 4.2.3, 4.2.x Nov 10, 2023
@xuelian311 xuelian311 modified the milestones: 4.2.x, 4.3.0 Feb 14, 2024
@dotani1111 dotani1111 added the duplicate This issue or pull request already exists label Feb 26, 2024
@dotani1111
Copy link
Contributor

@refine-kenshi
下記PRと重複するため、クローズ致します。
#4912

@dotani1111 dotani1111 closed this Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement 機能追加 Status: discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants