@riebeckite/plugin-analytics 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README_ja.md +13 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/README_ja.md
CHANGED
|
@@ -46,6 +46,18 @@ Core の安定コンテンツ ID(frontmatter の `id`)がある公開コン
|
|
|
46
46
|
|
|
47
47
|
コンテンツ ID は執筆側の責務です。公開ノート間での `id` の重複は [`@riebeckite/plugin-diagnostics`](../diagnostics/README_ja.md) が報告し(`duplicate-content-id` / `invalid-content-id`)、プラグイン自身の `validateAnalyticsOptions` が `check` 時に検証します。
|
|
48
48
|
|
|
49
|
+
## プロバイダ契約
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
const result = await provider.query({
|
|
53
|
+
type: "popular_content",
|
|
54
|
+
limit: 10,
|
|
55
|
+
timeRange: { from: "2026-01-01T00:00:00.000Z" },
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
機能(capability)は `capture`、`content_page_views`、`popular_content` です。すべてのクエリに対応しないプロバイダを実装する場合は、`assertAnalyticsQuerySupported(provider, query)` を呼び出してください。
|
|
60
|
+
|
|
49
61
|
## 診断
|
|
50
62
|
|
|
51
63
|
`@riebeckite/plugin-diagnostics` は、サイトで本プラグインが有効なとき、安定 content ID を持たない公開コンテンツを `analytics-untracked` として報告します。計測の抜けを `check` / `doctor` / build の診断で確認できます。
|
|
@@ -60,4 +72,4 @@ Core の安定コンテンツ ID(frontmatter の `id`)がある公開コン
|
|
|
60
72
|
|
|
61
73
|
## 関連リンク
|
|
62
74
|
|
|
63
|
-
- [プラグイン API](../../../docs/docs/reference/plugin-api.md)
|
|
75
|
+
- [プラグイン API](../../../docs/docs/reference/plugin-api.ja.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-analytics",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@riebeckite/core": "0.0.
|
|
23
|
+
"@riebeckite/core": "0.0.20"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"tsx": "^4.22.4"
|