Skip to content

Commit 571c387

Browse files
authored
Merge pull request #30 from ingestly/internal-optimization-20200306
Optimization 20200306
2 parents 260a768 + 7c878d9 commit 571c387

10 files changed

+225
-177
lines changed

README-JP.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ npm run build
7171

7272
追加の計測機能を有効化できます。
7373

74+
### セッションIDサポート
75+
76+
- 少なくないウェブアナリストがまだ「セッション」に基づく行動の集計をしており、もしレコードにセッションIDが無ければSQLで対処することになります。
77+
- このSDKは、 `options.session.enable``true` をセットすることで、セッションIDをセット・計測することができます。また、以下の追加オプションが利用できます:
78+
79+
|変数||説明|
80+
|:---|:---|:---|
81+
|domain|`example.com`|Cookie発行元ドメイン。もしサブドメインを跨いでCookieを共有したい場合、親ドメインを指定します|
82+
|lifetime|`1800`|Cookieの有効期限の秒。もし訪問者がこの指定秒数以上ビーコンを送らないでいた場合、セッションは次のページで更新されます|
83+
7484
### リアルユーザーモニタリング
7585

7686
- 各クライアントにおける実際のページロードの時間軸に基づくパフォーマンス情報、Real User Monitoringの計測ができます

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ Note: If you remove `eventName` and/or `eventFrequency`, or set `0` for `eventFr
7070

7171
You can enable optional tracking features.
7272

73+
### Session ID support
74+
75+
- Not a few web analyst still uses "Session" based behavior aggregation, and it requires an SQL skills if records don't have a session ID.
76+
- This SDK can set a session ID and collect it by setting `true` to `options.session.enable`, and you can use additional options below:
77+
78+
|variable|example|description|
79+
|:---|:---|:---|
80+
|domain|`example.com`|A domain name to be set as an issuer of the cookie. If you want to share the cookie across multiple sub-domains, set a parent domain.|
81+
|lifetime|`1800`|A cookie lifetime in seconds. If the visitor does not send beacons over this value, session will be renewd on the next page.|
82+
7383
### Real User Monitoring
7484

7585
- You can measure the Real User Monitoring data which is the performance information based on timeline of page loading on each client.

example/page_code.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
prefix: 'ingestly',
1212
targetWindow: 'self',
1313
options: {
14+
session: {
15+
enable: true,
16+
domain: 'example.com',
17+
lifetime: 1800
18+
},
1419
rum: {
1520
enable: true
1621
},
@@ -31,15 +36,15 @@
3136
enable: true,
3237
threshold: 2,
3338
granularity: 20,
34-
targets: [].slice.call(window.document.getElementsByTagName('article'))
39+
targets: window.document.getElementsByTagName('article')
3540
},
3641
media: {
3742
enable: true,
3843
heartbeat: 5
3944
},
4045
form: {
4146
enable: true,
42-
targets: [].slice.call(window.document.getElementsByTagName('form'))
47+
targets: window.document.getElementsByTagName('form')
4348
}
4449
}
4550
});

0 commit comments

Comments
 (0)