# Metrics, dimensions and dates
Compass API allow you to retrieve metrics
(for example unique users) and filter and group those metrics by dimensions
(for example country).
By default, the results are displayed with a day granularity for the last 30 days, but you could change the granularity
and the dates
.
Here you can find a full list of all metrics and dimensions available.
# Metrics
Name | API value | Description |
---|---|---|
Average scroll | averageScroll | |
Unique users | uniqueUsers | |
Page views | pageViewsTotal | |
Average RFV | averageRFV | |
Cumulative RFV | cumulativeRFV | Sum of the RFV of each page view |
Total duration | totalDuration | |
Average duration per user | averageDurationPerUser | |
Average duration per PV | averageDurationPerPage | |
Average PV per user | pageViewsPerUser | |
Total revenue | revenueTotal | |
Ad impression count | adsImpressions | |
Average CPM | CPM | |
ARPU * 1000 | RPM | |
Average ads per page | adsPerPage | |
Published articles | newArticles |
# Dimensions
Name | API value | Description | Allowed operators | Incompatible metrics |
---|---|---|---|---|
Source | source | utm_source or calculated source of the session | eq , neq , like , nlike | newArticles |
Source with internal | sourceInternal | source in case it's the first PV of the session, internal or the provided recirculation source for other PV | eq , neq , like , nlike | newArticles |
Medium | medium | utm_medium or calculated medium of the session | eq , neq , like , nlike | newArticles |
Medium with internal | mediumInternal | source in case it's the first PV of the session, internal for other PV | eq , neq , like , nlike | newArticles |
Campaign | campaign | utm_campaign | eq , neq , like , nlike | newArticles |
Campaign with internal | campaignInternal | campaign in case it's the first PV of the session, internal for other PV | eq , neq , like , nlike | newArticles |
Device category | deviceType | eq , neq | newArticles | |
User type | userType | eq , neq | newArticles | |
User engagement | visitorFrequency | eq , neq | newArticles | |
Page technology | pageTechnology | eq , neq | newArticles | |
URL | url | eq , neq , like , nlike | ||
Domain | domain | eq , neq , like , nlike | ||
Title | title | eq , neq , like , nlike | ||
Section | section | Section of the article, note that if an article has multiple sections the metric will be counted in all of those sections | eq , neq , like , nlike | |
Author | author | Author of the article, note that if an article has multiple authors the metric will be counted in all of those authors | eq , neq , like , nlike | |
Topic | topic | Topic of the article, note that articles usually have multiple topics and the metric will be counted in all of those topics | eq , neq , like , nlike | |
Article publish date | publishDate | eq , neq , gt , lt | ||
Content type by age | contentByAge | eq , neq | ||
Visitor country | country | eq , neq | newArticles | |
Weekday | weekDay | eq , neq | ||
Ad category | adType | eq , neq , like , nlike | newArticles |
# Dates and granularity
There are some constrains in the granularity based on the selected period and your contract.
TIP
In case you use a not allowed granularity it will be changed by the API to a bigger one
Granularity | Value | Allowed selection |
---|---|---|
Realtime | realtime | Period length < 24 hours and start > 28 days ago |
Hourly | hourly | Period length < 7 days and start > 60 days ago |
Daily | daily | Period length < 90 days |
Weekly | weekly | Period length < 2 years |
Monthly | monthly | All |
You can query the data for a period of time providing the start
and the end
of the period, or by querying last
N units of a period of time (ex. last 10 days or last 24 hours)
For querying using the last syntax you should provide a dimension
(hour
,day
,week
,month
) and the number
of units to retrieve from now to the past.