Retrieve all pages with last view date with total view count

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Data on how often a page is viewed and whether it has been viewed recently can be valuable in a variety of situations, such as pruning old content. This article contains instructions for retrieving this information from the database.

ソリューション

The below query will retrieve the following data:

  • Total Views Per Page
  • Page Title
  • Space Name
  • Space Key
  • Latest Viewed Date/Time
  • Content ID

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

SELECT count (*) as "TOTAL_VIEWS_PER_PAGE",
c.title AS "PAGE_TITLE",
s.spacename AS "SPACE_NAME",
s.spacekey AS "SPACE_KEY",
max(to_timestamp(aoe."EVENT_AT" / 1000)::timestamp) AS "LATEST_VIEWEDTIME",
c.contentid AS "CONTENT_ID"
FROM "AO_7B47A5_EVENT" aoe
JOIN content c on aoe."CONTENT_ID" = c.contentid
JOIN spaces s on c.spaceid = s.spaceid
JOIN user_mapping um ON aoe."USER_KEY" = um.user_key 
WHERE aoe."NAME" = 'page_viewed'
AND c.prevver is null 
AND c.CONTENT_STATUS = 'current'
GROUP BY aoe."CONTENT_ID", c.spaceid, c.title, s.spacename, c.contentid, s.spacekey
ORDER BY s.spacename;

詳細情報

For a broader overview on retrieving content analytics and additional queries to pull similar data, please see the below article:

最終更新日 2023 年 8 月 17 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.