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

feat: google analytics #15451

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open

feat: google analytics #15451

wants to merge 19 commits into from

Conversation

syuilo
Copy link
Member

@syuilo syuilo commented Feb 11, 2025

What

Resolve #15426

Why

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js labels Feb 11, 2025
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 29.26829% with 116 lines in your changes missing coverage. Please review.

Project coverage is 44.11%. Comparing base (7c87dec) to head (25163c9).

Files with missing lines Patch % Lines
packages/frontend/src/analytics.ts 26.31% 56 Missing ⚠️
...ges/frontend/src/pages/admin/external-services.vue 0.00% 35 Missing ⚠️
packages/frontend/src/boot/common.ts 0.00% 10 Missing ⚠️
packages/frontend/src/router/main.ts 12.50% 7 Missing ⚠️
...kend/src/server/api/endpoints/admin/update-meta.ts 14.28% 6 Missing ⚠️
...ges/backend/src/core/entities/MetaEntityService.ts 0.00% 1 Missing ⚠️
...ges/backend/src/server/api/endpoints/admin/meta.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #15451      +/-   ##
===========================================
+ Coverage    40.86%   44.11%   +3.24%     
===========================================
  Files         1609     1614       +5     
  Lines       161806   167781    +5975     
  Branches      3786     4156     +370     
===========================================
+ Hits         66119    74013    +7894     
+ Misses       95239    93320    -1919     
  Partials       448      448              

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

Copy link
Contributor

github-actions bot commented Feb 11, 2025

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -9499,6 +9499,12 @@
                     "enableTestcaptcha": {
                       "type": "boolean"
                     },
+                    "googleAnalyticsMeasurementId": {
+                      "type": [
+                        "string",
+                        "null"
+                      ]
+                    },
                     "swPublickey": {
                       "type": [
                         "string",
@@ -10006,6 +10012,7 @@
                     "enableTurnstile",
                     "turnstileSiteKey",
                     "enableTestcaptcha",
+                    "googleAnalyticsMeasurementId",
                     "swPublickey",
                     "mascotImageUrl",
                     "bannerUrl",
@@ -17359,6 +17366,12 @@
                   "enableTestcaptcha": {
                     "type": "boolean"
                   },
+                  "googleAnalyticsMeasurementId": {
+                    "type": [
+                      "string",
+                      "null"
+                    ]
+                  },
                   "sensitiveMediaDetection": {
                     "type": "string",
                     "enum": [
@@ -83252,6 +83265,12 @@
           "enableTestcaptcha": {
             "type": "boolean"
           },
+          "googleAnalyticsMeasurementId": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
           "swPublickey": {
             "type": [
               "string",
@@ -83445,6 +83464,7 @@
           "enableTurnstile",
           "turnstileSiteKey",
           "enableTestcaptcha",
+          "googleAnalyticsMeasurementId",
           "swPublickey",
           "mascotImageUrl",
           "bannerUrl",

Get diff files from Workflow Page

@kakkokari-gtyih kakkokari-gtyih linked an issue Feb 11, 2025 that may be closed by this pull request
1 task
@kakkokari-gtyih kakkokari-gtyih added this to the v2025.2.1 milestone Feb 11, 2025
Comment on lines 27 to 30

analytics.page({
path: ctx.path,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

replaceに反応しないのでchangeイベントで取ったほうがいいかも

@kakkokari-gtyih
Copy link
Contributor

kakkokari-gtyih commented Feb 15, 2025

(ページタイトルの切り替わりがrouterのイベントのタイミングと一致しないのでpageMetadataとタイミングを合わせて送信する必要がありそう)

@anatawa12 anatawa12 changed the title wip: ga wip: google analysis Feb 16, 2025
@anatawa12
Copy link
Member

issueの流れ見てない人にとってタイトルで把握しづらいと思ったのでタイトル変えました

@acid-chicken acid-chicken changed the title wip: google analysis wip: google analytics Feb 17, 2025
@syuilo
Copy link
Member Author

syuilo commented Feb 20, 2025

最低限の動作はできた

@syuilo syuilo marked this pull request as ready for review February 21, 2025 03:57
@syuilo syuilo changed the title wip: google analytics feat: google analytics Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔥high priority packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js
Projects
Development

Successfully merging this pull request may close these issues.

GoogleAnalytics対応
3 participants