uv-by-time

📘

This Reporting API endpoint was decommissioned on October 31, 2023, as part of the Delivery Reports Consolidation initiative. Learn more in the Delivery Reports Consolidation guide.

The following shows how to generate the uv-by-time report using either the Reporting API's Generate a report POST operation or the Get a cacheable report GET operation. Details about each report's supported products, metrics, filters, and available data intervals are also available dynamically by running the API's Get a report type operation, also shown below. See also other available reports.

Report definition

Returns unique visitor data over time.

This report allows you to configure the aggregation interval for each data record. Available interval values are: MONTH, WEEK, DAY, HOUR.

Business object: cpcode

Data available for: 92 days

Available metrics

MetricDescription
Data metrics
allUniqueVisitorsThe total number of unique combinations of client IP addresses plus User Agent.
ipv4UniqueVisitorsThe number of unique combinations of client IPv4 addresses plus User Agent.
ipv6UniqueVisitorsThe number of unique combinations of client IPv6 addresses plus User Agent.
Summary metrics
allUniqueVisitorsAverageThe average number of unique combinations of client IP addresses plus User Agent.
allUniqueVisitorsMaxThe highest number of unique combinations of client IP addresses plus User Agent.
allUniqueVisitorsMinThe lowest number of unique combinations of client IP addresses plus User Agent.
allUniqueVisitorsSlopeRepresents the overall change in the unique combinations of client IP addresses plus User Agent (or player ID for streaming) over time, a positive number if increasing or a negative number if decreasing.
ipv4UniqueVisitorsAverageThe average number of unique combinations of client IPv4 addresses plus User Agent.
ipv4UniqueVisitorsMaxThe highest number of unique combinations of client IPv4 addresses plus User Agent.
ipv4UniqueVisitorsMinThe lowest number of unique combinations of client IPv4 addresses plus User Agent.
ipv4UniqueVisitorsSlopeRepresents the overall change in the unique combinations of client IPv4 addresses plus User Agent (or player ID for streaming) over time, a positive number if increasing or a negative number if decreasing.
ipv6UniqueVisitorsAverageThe average number of unique combinations of client IPv6 addresses plus User Agent.
ipv6UniqueVisitorsMaxThe highest number of unique combinations of client IPv6 addresses plus User Agent.
ipv6UniqueVisitorsMinThe lowest number of unique combinations of client IPv6 addresses plus User Agent.
ipv6UniqueVisitorsSlopeRepresents the overall change in the unique combinations of client IPv6 addresses plus User Agent over time, a positive number if increasing or a negative number if decreasing.

POST request

POST /reporting-api/v1/reports/uv-by-time/versions/1/report-data{?start,​end,​interval}

Sample: /reporting-api/v1/reports/uv-by-time/versions/1/report-data?start​=2020-06-26T10%3A00%3A00Z​&end​=2020-06-26T14%3A00%3A00Z​&interval​=HOUR

Query parameters

ParameterTypeSampleDescription
Required
startString2020-06-26T10:00:00ZSpecifies the start of the reported period as an ISO-8601 timestamp with optional time zone. The report includes data that matches the start value's timestamp.
endString2020-06-26T14:00:00ZSpecifies the end of the reported period as an ISO-8601 timestamp with optional time zone. The report excludes any data that matches the end value's timestamp.
intervalEnumerationHOURThe duration of each data record. Available values: MONTH, WEEK, DAY, HOUR.

JSON request members

MemberTypeDescription
objectIdsArraySpecifies the set of cpcode values you want to report on.
objectIdsEnumerationAs an alternative to an array of ID values, specify all as a string for unfiltered data. Either way, objectIds is required.
metricsArrayThe set of desired metrics. If omitted, the report includes all available metrics.

Request body:

{
    "objectIds": [
        "55232",
        "23433",
        "32433"
    ],
    "metrics": [
        "allUniqueVisitors",
        "allUniqueVisitorsAverage",
        "allUniqueVisitorsMax",
        "allUniqueVisitorsMin",
        "allUniqueVisitorsSlope",
        "ipv4UniqueVisitors",
        "ipv4UniqueVisitorsAverage",
        "ipv4UniqueVisitorsMax",
        "ipv4UniqueVisitorsMin",
        "ipv4UniqueVisitorsSlope",
        "ipv6UniqueVisitors",
        "ipv6UniqueVisitorsAverage",
        "ipv6UniqueVisitorsMax",
        "ipv6UniqueVisitorsMin",
        "ipv6UniqueVisitorsSlope"
    ]
}

GET request

GET /reporting-api/v1/reports/uv-by-time/versions/1/report-data{?start,​end,​interval,​objectIds,​allObjectIds,​metrics}

Sample: /reporting-api/v1/reports/uv-by-time/versions/1/report-data?start​=2020-06-26T10%3A00%3A00Z​&end​=2020-06-26T14%3A00%3A00Z​&interval​=HOUR​&objectIds​=55232,​23433,​32433​&metrics​=allUniqueVisitors%2CallUniqueVisitorsAverage

Query parameters

ParameterTypeSampleDescription
Required
startString2022-06-23T13:55:00ZSpecifies the start of the reported period as an ISO-8601 timestamp with optional time zone. The report includes data that matches the start value’s timestamp.
endString2022-06-23T14:15:00ZSpecifies the end of the reported period as an ISO-8601 timestamp with optional time zone. The report excludes any data that matches the end value’s timestamp.
intervalEnumerationHOURThe duration of each data record. Available values: MONTH, WEEK, DAY, HOUR.
Optional
allObjectIdsBooleantrueAs an alternative to objectIds, enabling this generates a report that includes all IDs available for the cpcode objectType. This parameter is ignored if the request also specifies a set of objectIds.
objectIdsString55232,​23433,​32433As an alternative to allObjectIds, specifies the set of unique IDs for the cpcode objectType you want to report on, formatted as a comma-delimited list.
metricsStringallUniqueVisitors,​allUniqueVisitorsAverageSpecifies a comma-separated list of metrics to include in the report, otherwise all metrics if omitted. The set of available metrics depends on the type of report. URL-encode the entire value in the GET request.

JSON response

Status 200 application/json

Response body:

{
    "metadata": {
        "name": "uv-by-time",
        "version": "1",
        "outputType": "FLAT",
        "groupBy": [
            "startdatetime"
        ],
        "interval": "HOUR",
        "start": "2020-06-26T10:00:00Z",
        "end": "2020-06-26T14:00:00Z",
        "availableDataEnds": null,
        "suggestedRetryTime": null,
        "rowCount": 4,
        "filters": [],
        "columns": [
            {
                "name": "groupBy",
                "label": "startdatetime"
            },
            {
                "name": "allUniqueVisitors",
                "label": "Unique Visitors"
            },
            {
                "name": "ipv4UniqueVisitors",
                "label": "Unique Visitors"
            },
            {
                "name": "ipv6UniqueVisitors",
                "label": "Unique Visitors"
            }
        ],
        "objectType": "cpcode",
        "objectIds": [
            "55232",
            "23433",
            "32433"
        ]
    },
    "data": [
        {
            "startdatetime": "2020-06-26T10:00:00Z",
            "allUniqueVisitors": "4662",
            "ipv4UniqueVisitors": "708",
            "ipv6UniqueVisitors": "2491"
        },
        {
            "startdatetime": "2020-06-26T11:00:00Z",
            "allUniqueVisitors": "3039",
            "ipv4UniqueVisitors": "4159",
            "ipv6UniqueVisitors": "187"
        },
        {
            "startdatetime": "2020-06-26T12:00:00Z",
            "allUniqueVisitors": "1170",
            "ipv4UniqueVisitors": "2915",
            "ipv6UniqueVisitors": "2014"
        },
        {
            "startdatetime": "2020-06-26T13:00:00Z",
            "allUniqueVisitors": "4",
            "ipv4UniqueVisitors": "837",
            "ipv6UniqueVisitors": "1662"
        }
    ],
    "summaryStatistics": {
        "allUniqueVisitorsAverage": {
            "value": "183",
            "details": {}
        },
        "allUniqueVisitorsMax": {
            "value": "3991",
            "details": {}
        },
        "allUniqueVisitorsMin": {
            "value": "1599",
            "details": {}
        },
        "allUniqueVisitorsSlope": {
            "value": "2423",
            "details": {}
        },
        "ipv4UniqueVisitorsAverage": {
            "value": "833",
            "details": {}
        },
        "ipv4UniqueVisitorsMax": {
            "value": "3355",
            "details": {}
        },
        "ipv4UniqueVisitorsMin": {
            "value": "4254",
            "details": {}
        },
        "ipv4UniqueVisitorsSlope": {
            "value": "2632",
            "details": {}
        },
        "ipv6UniqueVisitorsAverage": {
            "value": "705",
            "details": {}
        },
        "ipv6UniqueVisitorsMax": {
            "value": "4488",
            "details": {}
        },
        "ipv6UniqueVisitorsMin": {
            "value": "3845",
            "details": {}
        },
        "ipv6UniqueVisitorsSlope": {
            "value": "4043",
            "details": {}
        }
    }
}

CSV response

Status 200 text/csv

Response Body:

#METADATA_START
name,​uv-by-time
version,​1
source,​uv-by-time/versions/1
groupBy,​startdatetime
start,​2020-06-26T10:00:00Z
end,​2020-06-26T14:00:00Z
interval,`HOUR`
availableDataEnds,
suggestedRetryTime,
rowCount,​4
objectType,​cpcode
objectIds,​55232,​23433,​32433
#METADATA_END

#SUMMARYSTATISTICS_START
allUniqueVisitorsAverage,​183
allUniqueVisitorsMax,​3991
allUniqueVisitorsMin,​1599
allUniqueVisitorsSlope,​2423
ipv4UniqueVisitorsAverage,​833
ipv4UniqueVisitorsMax,​3355
ipv4UniqueVisitorsMin,​4254
ipv4UniqueVisitorsSlope,​2632
ipv6UniqueVisitorsAverage,​705
ipv6UniqueVisitorsMax,​4488
ipv6UniqueVisitorsMin,​3845
ipv6UniqueVisitorsSlope,​4043
#SUMMARYSTATISTICS_END

#COLUMNS_START
startdatetime,​allUniqueVisitors,​ipv4UniqueVisitors,​ipv6UniqueVisitors
#COLUMNS_END

#DATA_START
2020-06-26T10:00:00Z,4662,​708,​2491
2020-06-26T11:00:00Z,3039,​4159,​187
2020-06-26T12:00:00Z,1170,​2915,​2014
2020-06-26T13:00:00Z,4,​837,​1662
#DATA_END

Get report details

This sample Get a report type operation gets the same information you need to run the uv-by-time report as provided in this reference documentation, but available dynamically to your API client application.

GET /reporting-api/v1/reports/uv-by-time/versions/1

Status 200 application/json

Response body:

{
    "name": "uv-by-time",
    "description": "Returns unique visitor data over time.",
    "businessObjectName": "cpcode",
    "version": 1,
    "status": "PUBLISHED",
    "deprecated": false,
    "timeBased": true,
    "outputType": "FLAT",
    "requiredProducts": [
        "Basic Traffic Reports"
    ],
    "requiredRoles": [
        "Reports - All privileges ",
        "Reports - View only",
        "OTA App User"
    ],
    "available": true,
    "metrics": [
        {
            "name": "allUniqueVisitors",
            "description": "The total number of unique combinations of client IP addresses plus User Agent.",
            "label": "Unique Visitors",
            "unit": "COUNT",
            "summaryStatistic": false
        },
        {
            "name": "allUniqueVisitorsAverage",
            "description": "The average number of unique combinations of client IP addresses plus User Agent.",
            "label": "Unique Visitors Average",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "allUniqueVisitorsMax",
            "description": "The highest number of unique combinations of client IP addresses plus User Agent.",
            "label": "Unique Visitors Maximum",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "allUniqueVisitorsMin",
            "description": "The lowest number of unique combinations of client IP addresses plus User Agent.",
            "label": "Unique Visitors Minimum",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "allUniqueVisitorsSlope",
            "description": "Represents the overall change in the unique combinations of client IP addresses plus User Agent (or player ID for streaming) over time, a positive number if increasing or a negative number if decreasing.",
            "label": "Unique Visitors Slope",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "ipv4UniqueVisitors",
            "description": "The number of unique combinations of client IPv4 addresses plus User Agent.",
            "label": "Unique Visitors",
            "unit": "COUNT",
            "summaryStatistic": false
        },
        {
            "name": "ipv4UniqueVisitorsAverage",
            "description": "The average number of unique combinations of client IPv4 addresses plus User Agent.",
            "label": "Unique Visitors Average",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "ipv4UniqueVisitorsMax",
            "description": "The highest number of unique combinations of client IPv4 addresses plus User Agent.",
            "label": "Unique Visitors Maximum",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "ipv4UniqueVisitorsMin",
            "description": "The lowest number of unique combinations of client IPv4 addresses plus User Agent.",
            "label": "Unique Visitors Minimum",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "ipv4UniqueVisitorsSlope",
            "description": "Represents the overall change in the unique combinations of client IPv4 addresses plus User Agent (or player ID for streaming) over time, a positive number if increasing or a negative number if decreasing.",
            "label": "Unique Visitors Slope",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "ipv6UniqueVisitors",
            "description": "The number of unique combinations of client IPv6 addresses plus User Agent.",
            "label": "Unique Visitors",
            "unit": "COUNT",
            "summaryStatistic": false
        },
        {
            "name": "ipv6UniqueVisitorsAverage",
            "description": "The average number of unique combinations of client IPv6 addresses plus User Agent.",
            "label": "Unique Visitors Average",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "ipv6UniqueVisitorsMax",
            "description": "The highest number of unique combinations of client IPv6 addresses plus User Agent.",
            "label": "Unique Visitors Maximum",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "ipv6UniqueVisitorsMin",
            "description": "The lowest number of unique combinations of client IPv6 addresses plus User Agent.",
            "label": "Unique Visitors Minimum",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "ipv6UniqueVisitorsSlope",
            "description": "Represents the overall change in the unique combinations of client IPv6 addresses plus User Agent over time, a positive number if increasing or a negative number if decreasing.",
            "label": "Unique Visitors Slope",
            "unit": "COUNT",
            "summaryStatistic": true
        }
    ],
    "groupOutlyingValues": {
        "enabled": false
    },
    "groupBy": [
        "startdatetime"
    ],
    "intervals": [
        "MONTH",
        "WEEK",
        "DAY",
        "HOUR"
    ],
    "dataRetentionDays": 92,
    "links": [
        {
            "rel": "self",
            "href": "/reporting-api/v1/reports/uv-by-time/versions/1"
        },
        {
            "rel": "versions",
            "href": "/reporting-api/v1/reports/uv-by-time/versions"
        },
        {
            "rel": "all-reports",
            "href": "/reporting-api/v1/reports"
        },
        {
            "rel": "execute-report",
            "href": "/reporting-api/v1/reports/uv-by-time/versions/1/report-data"
        }
    ]
}