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

記事公開日ランキングの取得方法

概要

記事の公開日を指定して、ランキングデータをPianoe Insight を利用して取得する方法について説明します。

 

準備

下記のメタデータを記事に挿入します。

a) 日付を指定してランキングを取得したい場合

フォーマット:<meta name="cXenseParse:xyz-pubdate" content="yyyymmdd"/>

挿入例:<meta name="cXenseParse:xyz-pubdate" content="20151112"/>

注意

xyz: お客様ごとの3文字のプリフィックスが入ります。わからない場合には、support@cxense.comにご連絡を下さい。

 

b) 月を指定してランキングを取得したい場合

フォーマット:<meta name="cXenseParse:xyz-pubmonth" content="yyyymm"/>

挿入例:<meta name="cXenseParse:xyz-pubmonth" content="201511"/>

 

注意

xyz: お客様ごとの3文字のプリフィックスが入ります。わからない場合には、support@cxense.comにご連絡を下さい。

 

Piano Insight APIでのランキング取得方法

バッチ処理にて、Cxense Insight APIを実行しランキング情報を取得します。

 

フィルターなどは、要件に応じて追加してください。

下記例では、フィルタ条件として、{"type":"keyword","group":"pageclass","item":"article"}を付与して、記事のみに絞っています。

 

2015年11月12日のランキング

python cx.py /traffic/event '{"siteId":"12345", "groups":["url"], "fields":["title"], "filters":[{"type":"event","group":"xyz-pubdate","item":"20151112"},{"type":"keyword","group":"pageclass","item":"article"}]}'

注意

siteId: ランキングを取得したいサイトのサイトIDを入力します。

xyz: お客様ごとの3文字のプリフィックスが入ります。わからない場合には、support@cxense.comにご連絡を下さい。

2015年11月のランキング

python cx.py /traffic/event '{"siteId":"12345", "groups":["url"], "fields":["title"], "filters":[{"type":"event","group":"xyz-pubdate","item":"201511"},{"type":"keyword","group":"pageclass","item":"article"}]}'

注意

siteId: ランキングを取得したいサイトのサイトIDを入力します。

xyz: お客様ごとの3文字のプリフィックスが入ります。わからない場合には、support@cxense.comにご連絡を下さい。

 

ランキング表示方法について

 

サイト上にランキング情報を表示する際には、ユーザーのアクセスごとにAPIを実行するのではなく、

必ず、サーバーサイドで定期的にAPIを実行し、その結果をキャッシュしてご利用ください。

Unknown Attachment


 

Last updated: