We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

期間毎(日付、時間、分、秒)での最大PV数

概要

日付、時間、分、秒単位の期間毎に、最大PVがどのくらいかを確認するためのカスタムウィジェットの利用方法について説明します。

取得方法は、以下の通りです。

  1. 最大PVの日別データを取得

  2. 1.で取得した日付の中で、時間毎での最大PV数を取得

  3. 2.の時間帯から、1分単位で最大PVとなっている期間を取得

  4. 3. の1分間中の、1秒間での最大PV数を出力

作成方法:

  1. Persistedクエリの作成

サイトの閲覧権限のあるユーザで、以下のAPIを実行します。

python cx.py /persisted/create '{"path":"/traffic", "description":"瞬間最大PV", "request":{"fields":["events"],"historyFields":["events"]},"mutable": {"filters": true, "siteGroupId":true, "siteId": true, "start": true, "stop":true, "historyResolution": true, "historyBuckets": true}}'

2. PersistedクエリIDの取得

1.のAPIを実行するとIDが返ってきますので、そのIDを保存します。

後からでも、https://admin.cxense.comにアクセスし、APIタブをクリックすることで、登録したIDをご確認いただけます。

3. ワークスペースへアクセスします。

4.「ウィジェットの追加」をクリックします。

5.「ウィジェットの選択」をクリックします。

6.「外部コンテンツ」をクリックし、「追加ボタン」をクリックします。

image-20220112-024828.png

7. 追加されたウィジェットのテキストボックスに以下を入力します。

https://cdn.cxpublic.com/jps-maxpv.html?group={{group}}&site={{site}}&start={{start}}&stop={{stop}}&filter={{filter}}&segment={{segment}}&persistedId=XXXX

「XXXX」の部分に、 2. で取得したPersisted IDを指定します。

8. 以下のようなウィジェットが表示されます。

image-20220112-024858.png

オーディエンスでの絞り込み、フィルターによる絞り込みも可能




Last updated: