Added in 24.05.
Note: This guide is a work in progress based on the API which is under development. This guide will have more information about different metrics in future releases.
The Analytics API offers all the metrics and reports available on the Aurora Analytics dashboard. It also provides on-demand insights to Aurora Customers.
To access the Analytics GraphQL, see Using our GraphQL Documentation.
You will see how the Analytics API can be used to request:
- Aurora Analytics metrics and reports
- On-demand insights available via Aurora Analytics API (more will be added in future releases):
Note: To enable On-demand insights, raise a support ticket.
- Total fully registered members who are not deleted and not currently banned
- Total number of fully registered members who are not deleted and not currently banned belonging to the current rank (for example,
R1
) - Active members (for example, members who have visited the community in the last 90 days)
You can use the Aurora Analytics API to request the following metrics that are available in the Analytics Dashboard UI. For more information about the metrics, see Aurora Analytics Metric Definitions in Atlas.
Metric Name | GraphQL Metric Name | Metrics Data Fetched |
---|---|---|
Page views | pageViews | Number of page views of your community |
Visits | visits | Number of visits to any page of your community |
Member Registrations (Completed and Partial) | memberRegistrations | Registrations of both the partial and completed registrations |
Topics - Follows | topics | Number of followers for the topics |
Replies | replies | Number of replies received for the discussions |
Likes | kudosGiven | Number of likes given to any post |
Unique Visitors | uniqueVisitors | Number of unique visitors in your community |
Daily Active Users (DAU)/ Monthly Active Users (MAU) | dauByMau | Ratio of DAU and MAU |
Time to First Reply | avgTimeToFirstForumReply | The average time taken before the first reply is posted |
Time to Solution | avgTimeToFirstForumSolution | The average time taken before the first forum solution is posted |
The first 10 metrics along with their constraints and examples are explained in the guide.
Note: Using the examples provided in the guide, users can build their own GraphQL query to request any other analytics metrics and reports.
Page Views
Page Views approximate user behavior and exclude non-human requests (web crawler, bots, RSS feeds, REST API calls).
Use the following constraints to fetch the Page views metric data:
Constraint Name | Constraint Definition | Type |
---|---|---|
startTime | Start time of the time range | Integer |
endTime | End time of the time range | Integer |
nodeIds | Node ID constraint | ID |
completedOccasionOnly | Computes the metric only for the completed occasions | Boolean |
conversationStyle | Content type filter | Enum |
interval | Interval to fetch chart data at desired time granularity | String |
excludeNodeLevelMetric | Excludes metrics of the nodes of the community, giving metrics only for the content | Boolean |
metricScope | Includes and excludes the nodes of community or content for the metric | Enum |
role | Role-based filter | String |
rank | Rank based filter | String |
userName | User name filter | String |
newTopicsOnly | Computes the metric only for new topics | Boolean |
matchDaysofWeek | The previous period will match the exact days of the week as the current period | Boolean |
userType | User Type Filter | Enum |
nodeType | Node Type Filter | Enum |
Example
Sample GraphQL Query to fetch page views:
query pageViews($constraints: PageViewsConstraints!, $sorts: MetricSorts) {
pageViews(constraints: $constraints, sorts: $sorts) {
metric {
metric
value
percentageChange
percentageChangeLastYear
percentageChangeTimeRange {
startTime
endTime
}
percentageChangeLastYearTimeRange {
startTime
endTime
}
responseMessages {
message
code
}
}
chartDataConnection {
...chartDataConnectionFragment
}
chartDataLastDateRangeConnection {
...chartDataConnectionFragment
}
chartDataLastYearConnection {
...chartDataConnectionFragment
}
}
}
fragment chartDataConnectionFragment on ChartDataConnection {
totalCount
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
edges {
cursor
node {
timeStamp
elementValue
}
}
}
Sample variables:
{
"constraints": {
"startTime": 1614556800000,
"endTime": 1616371200000,
"interval": "ONE_DAY",
"excludeNodeLevelMetric": true,
"userName": {
"in": ["admin"]
},
"newTopicsOnly": true,
"matchDaysOfWeek": true
},
"sorts": {
"value": {
"direction": "ASC"
}
}
}
Aurora Analytics Reports
You can use the Aurora Analytics API to request the reports that are available in the Analytics Dashboard UI. For more information, see Aurora Analytics Reports in Atlas.
Using the Aurora Analytics API, you can fetch different reports.
Categories Report Data
You can retrieve the category report data for your community using the following GraphQL query and variables:
query categoryReport(
$constraints: CategoryReportConstraints!
$sorts: CategoryReportSorts
) {
categoryReport(
constraints: $constraints
sorts: $sorts
first: 10
after: "Mg=="
) {
connection {
totalCount
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
edges {
cursor
node {
id
name
pageViews
solutionsAccepted
visits
postSubscriptions
uniqueVisitors
blogArticlesPublished
tkbArticlesPublished
forumTopicsPublished
kudosGiven
}
}
}
}
}
Sample variables:
{
"constraints": {
"startTime": 1641859200000,
"endTime": 1642636800000,
"nodeIds": {
"in": ["board:myBoardId"]
}
},
"sorts": {
"sortMetric": "VISITS",
"direction": "ASC"
}
}
On-demand Insights
Note: To enable On-demand insights, raise a support ticket.
We will be introducing more on-demand insights in future releases.
Note: We have provided an example to retrieve the list of first-time contributors. Using it as a guide, you can fetch the list for other insights.
Fully Registered Members
Use the following constraints to fetch the fully registered members who are not deleted and not currently banned:
Constraint | Description |
---|---|
banStatus | The ban status of the community members |
deleteStatus | The delete status of the community members |
registrationStatus | The registration status of the community members |
Example
query membersReport($constraints: MembersReportConstraints!){
membersReport(constraints: $constraints, first: null, after: null) {
connection {
totalCount
}
}
}
{
"constraints": {
"asOfNowConstraints": {
"banStatus": "NOT_BANNED",
"deleteStatus": "NOT_DELETED",
"registrationStatus": "FULLY_REGISTERED"
}
}
}
ATLAS
Comments