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アナリティクス機能を追加 #4912

Merged
merged 20 commits into from
Apr 8, 2024

Conversation

yKazihara
Copy link
Contributor

@yKazihara yKazihara commented Feb 12, 2021

概要(Overview・Refs Issue)

管理画面でトラッキングIDを設定し、GA計測ができるようにしました。

関連Issue

#4837

方針(Policy)

  • トラッキングIDの登録は、管理画面の設定>店舗設定>基本設定に入力フォームを追加しました。
  • dtb_base_infoにトラッキングID保持用のカラムを追加しました。

実装に関する補足(Appendix)

  • トラッキングIDの登録がない場合は、フロント側のGA用スクリプトはまるごと表示されません。
    • 既にGAプラグインや実装などがされている場合、GA用スクリプトが重複して表示されることはありません。

テスト(Test)

トラッキングIDの登録ありなしで、フロント側のスクリプト表示非表示のテストを追加しました。

相談(Discussion)

特になし

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

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

レビュワー確認項目

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

@yKazihara yKazihara changed the title Feature/google analytics Googleアナリティクス機能を追加 Feb 12, 2021
@yKazihara yKazihara added the enhancement 機能追加 label Feb 12, 2021
src/Eccube/Entity/BaseInfo.php Outdated Show resolved Hide resolved
@okazy okazy added the affected:template フロントテンプレートの変更 label Feb 15, 2021
@okazy okazy added this to the 4.1 milestone Feb 15, 2021
Copy link
Contributor

@okazy okazy left a comment

Choose a reason for hiding this comment

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

@yKazihara
英語の言語ファイルにも追加をお願いします。
src/Eccube/Resource/locale/messages.en.yaml

@chihiro-adachi chihiro-adachi modified the milestones: 4.1, 4.1.x Sep 3, 2021
@chihiro-adachi chihiro-adachi changed the base branch from 4.1-feature to 4.1 September 6, 2021 05:20
@xuelian311 xuelian311 modified the milestones: 4.1.x, 4.2.2 May 8, 2023
@xuelian311 xuelian311 modified the milestones: 4.2.2, 4.2.x May 23, 2023
@xuelian311 xuelian311 modified the milestones: 4.2.x, 4.2.3 Jul 7, 2023
@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
@shinya shinya changed the base branch from 4.1 to 4.3 February 26, 2024 01:22
@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.71%. Comparing base (26ea5b9) to head (781e089).
Report is 5 commits behind head on 4.3.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                4.3    #4912      +/-   ##
============================================
- Coverage     82.77%   82.71%   -0.07%     
- Complexity     6509     6511       +2     
============================================
  Files           479      479              
  Lines         26029    26042      +13     
============================================
- Hits          21546    21541       -5     
- Misses         4483     4501      +18     
Flag Coverage Δ
E2E 70.08% <76.92%> (+<0.01%) ⬆️
Unit 79.55% <100.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shinya
Copy link
Contributor

shinya commented Feb 26, 2024

@chihiro-adachi @dotani1111 @ji-eunsoo
4.3αのコードを取り込み直しました。テストも通ったので、改めてレビューお願いします。

@ji-eunsoo
Copy link
Contributor

@shinya
GAのトラッキングが通っていることのご確認をお願い致します。

@shinya
Copy link
Contributor

shinya commented Mar 1, 2024

スクリーンショット 2024-03-01 9 07 08

GA上でもアクセスが来ることを確認できました

@k-yamamura
Copy link
Contributor

googleアナリティクスを導入する際にプライバシーポリシーに以下の記述が必要となりますが、
考慮する必要はないでしょうか。
https://support.google.com/analytics/answer/7318509?hl=ja

@shinya
Copy link
Contributor

shinya commented Mar 6, 2024

@k-yamamura
ありがとうございます。確かに考慮する必要ありだと感じました。
こちら一旦預かってやり方検討いたします。

@shinya
Copy link
Contributor

shinya commented Mar 7, 2024

WebサイトにGoogleAnalytics(以下GA)を導入する場合、
・GAを使ってトラッキングしていること
・そのトラッキングのためにCookieを使っていること
・収集したデータの保存・処理方法の説明(GAの規約リンクを貼るでもOK)
の記載が必要です。

しかし、GAのID発行の際に上記の必要性は使用者(この場合GAの使用者なのでサイトオーナーを指す)に通知されるため、
EC-CUBEが特別それを考慮する必要はないと感じました。
(ようはこの規約を知らずにサイトにGAを導入することはありえない)

また、本機能はあくまでタグの導入を支援する位置づけのものであり、
上記の規約云々を理解したユーザーがHTMLを直接編集する手間を軽減する目的で実装します。

とはいえ、何もしないのはさすがに不親切なのでユーザーが情報を調べられるようにはしておきたい。

以上の理由から、EC-CUBE内での対応は下記で行こうと考えています
・管理画面内のtooltipにはGAの規約を満たしたうえで使用するよう文言を変える
doc4運用マニュアルにそれぞれ使い方を記載しておく

ご意見ください。
問題なければそれで対応を進めます。

@dotani1111
Copy link
Contributor

動作確認OKでした。

@dotani1111
Copy link
Contributor

@chihiro-adachi
こちら問題なければApproveをお願い致します。

@dotani1111 dotani1111 merged commit 3c9b2a1 into EC-CUBE:4.3 Apr 8, 2024
94 checks passed
@dotani1111 dotani1111 mentioned this pull request May 9, 2024
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected:template フロントテンプレートの変更 enhancement 機能追加
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants