Articles
Introduction
This document provides guidance on utilizing GraphQL to query article metrics data. It includes information on the GraphQL endpoint, the structure of the data tables, and sample queries to retrieve relevant metrics.
Table Metric Details
articles
Field Name | Data Type | Dimensions | Metrics | Filters |
---|---|---|---|---|
site_id | text | yes | yes | |
article_id | text | yes | ||
title | text | |||
author | text | |||
author_id | text | yes | yes | |
category | text | yes | yes | |
published_date | text | yes | yes |
articles_daily
Field Name | Data Type | Dimensions | Metrics | Filters |
---|---|---|---|---|
site_id | text | yes | yes | |
period_date | text | yes | yes | |
article_id | text | yes | yes | |
page_views | bigint | yes | ||
new_users | bigint | yes | ||
bounce_rate | double precision | yes | ||
readability | double precision | yes | ||
pageviews_per_session | double precision | yes | ||
session_per_user | double precision | yes | ||
users | bigint | yes | ||
attention_time | bigint | yes | ||
total_time_spent | bigint | yes | ||
average_time_spent | bigint | yes | ||
avg_percent_played | double precision | yes | ||
avg_retention_rate | double precision | yes | ||
avg_playback_rate | double precision | yes | ||
valid_play_views | double precision | yes | ||
recirculation | double precision | yes |
articles_monthly
Field Name | Data Type | Dimensions | Metrics | Filters |
---|---|---|---|---|
site_id | text | yes | yes | |
period_year | integer | yes | yes | |
period_month | integer | yes | yes | |
article_id | text | yes | yes | |
page_views | bigint | yes | ||
new_users | bigint | yes | ||
bounce_rate | numeric | yes | ||
pageviews_per_session | numeric | yes | ||
session_per_user | numeric | yes | ||
users | bigint | yes | ||
attention_time | bigint | yes | ||
total_time_spent | bigint | yes | ||
average_time_spent | bigint | yes | ||
readability | double precision | yes | ||
avg_percent_played | double precision | yes | ||
avg_retention_rate | double precision | yes | ||
avg_playback_rate | double precision | yes | ||
valid_play_views | double precision | yes | ||
recirculation | double precision | yes |
articles_quarterly
Field Name | Data Type | Dimensions | Metrics | Filters |
---|---|---|---|---|
site_id | text | yes | yes | |
period_quarter | integer | yes | yes | |
period_year | integer | yes | yes | |
article_id | text | yes | yes | |
page_views | bigint | yes | ||
new_users | bigint | yes | ||
bounce_rate | numeric | yes | ||
pageviews_per_session | numeric | yes | ||
session_per_user | numeric | yes | ||
users | bigint | yes | ||
attention_time | bigint | yes | ||
total_time_spent | bigint | yes | ||
average_time_spent | bigint | yes | ||
readability | double precision | yes | ||
avg_percent_played | double precision | yes | ||
avg_retention_rate | double precision | yes | ||
avg_playback_rate | double precision | yes | ||
valid_play_views | double precision | yes | ||
recirculation | double precision | yes |
articles_yearly
Field Name | Data Type | Dimensions | Metrics | Filters |
---|---|---|---|---|
site_id | text | yes | yes | |
period_year | integer | yes | yes | |
article_id | text | yes | yes | |
page_views | bigint | yes | ||
new_users | bigint | yes | ||
bounce_rate | numeric | yes | ||
pageviews_per_session | numeric | yes | ||
session_per_user | numeric | yes | ||
users | bigint | yes | ||
attention_time | bigint | yes | ||
total_time_spent | bigint | yes | ||
average_time_spent | bigint | yes | ||
readability | double precision | yes | ||
avg_percent_played | double precision | yes | ||
avg_retention_rate | double precision | yes | ||
avg_playback_rate | double precision | yes | ||
valid_play_views | double precision | yes | ||
recirculation | double precision | yes |
articles_hourly
Field Name | Data Type | Dimensions | Metrics | Filters |
---|---|---|---|---|
site_id | text | yes | yes | |
article_id | text | yes | yes | |
page_views | bigint | yes | ||
new_users | bigint | yes | ||
bounce_rate | numeric | yes | ||
readability | numeric | yes | ||
pageviews_per_session | numeric | yes | ||
session_per_user | numeric | yes | ||
users | bigint | yes | ||
period_date | text | yes | yes | |
hour | double precision | yes | yes | |
attention_time | bigint | yes |
articles_overall_hourly
Field Name | Data Type | Dimensions | Metrics | Filters |
---|---|---|---|---|
site_id | text | yes | yes | |
page_views | bigint | yes | ||
new_users | bigint | yes | ||
bounce_rate | numeric | yes | ||
pageviews_per_session | numeric | yes | ||
session_per_user | numeric | yes | ||
users | bigint | yes | ||
period_date | text | yes | yes | |
hour | double precision | yes | yes | |
attention_time | bigint | yes |
Sample Queries
Query to Retrieve Articles Published Today
query GetArticelsToday {
wral_articles_daily(where: {article: {date_published: {_eq: "2024-03-08"}}}) {
article {
title
date_published
category
}
page_views
new_users
users
}
}
Query to Retrieve Monthly Page Views
query GetMonthlyPageViews {
wral_articles_monthly(where: {period_month: {_eq: 1}, period_year: {_eq: 2024}}) {
article_id
page_views
new_users
users
}
}