Upsight logo Back to top

Content Unit Reports

Content Unit Report

Description


Returns aggregate metrics for the specified content unit.

Content Unit Report

HTTP:GET


/report/game/<game_id:int>/content/<content_id:int>/report

Content Unit Report

Parameters


ParameterTypeDescription
game_id int The Game ID this content unit is associated with.
content_id int The Content ID the report is associated with.
auth Authentication token (authentication header may be used instead). Required

Content Unit Report

Example Request


GET /report/game/2012/content/2225/report?startts=1320883200&endts=1323993600

Content Unit Report

Example Response


{
    "errobj": null,
    "response": {
        "conversions": 14044,
        "revenue": 11149.72,
        "value": 5598.50,
        "startts": 1320883200,
        "actions": 96599,
        "conversionrate": 14.54,
        "actionrate": 5.87,
        "endts": 1323993600,
        "impressions": 1646949,
        "ecpm": 6.77
    },
    "error": null
}

Aggregate Content Unit Report

Description


Returns aggregated data for multiple content units for a span of time

Aggregate Content Unit Report

HTTP:GET


/report/game/<game_id:int>/content/aggregate/report

Aggregate Content Unit Report

Parameters


ParameterTypeDescription
game_id int The Game ID this content unit is associated with.
content_id int The Content ID the report is associated with.
auth Authentication token (authentication header may be used instead). Required

Aggregate Content Unit Report

Example Request


GET /report/game/1/content/aggregate/report?content=1,2,3&startts=1330560000&endts=1331164800

Aggregate Content Unit Report

Example Response


{
    "errobj": null,
    "response": {
        "conversions": 1578,
        "value": 0,
        "revenue": 609.79,
        "startts": 1330560000,
        "actions": 10980,
        "conversionrate": 14.37,
        "actionrate": 13.16,
        "endts": 1331164800,
        "impressions": 83466,
        "ecpm": 7.31
    },
    "error": null
}

Detailed Content Unit Report

Description


Returns meta data and a list of data points for the specified report type. Each data point is returned as a (timestamp, value) pair. Data points are spaced out according to the granularity parameter (set to 'day' by default). The API will not perform interpolation to fill gaps in reporting with intermediate data points.

Detailed Content Unit Report

HTTP:GET


/report/game/<game_id:int>/content/<content_id:int>/report/<report_type:str>

Detailed Content Unit Report

Parameters


ParameterTypeDescription
game_id int The Game ID this content unit is associated with.
content_id int The Content ID the report is associated with.
report_type string See the Detailed Content Report Types table.
auth Authentication token (authentication header may be used instead). Required

Detailed Content Unit Report

Example Request


GET /report/game/2102/content/1000107/report/ecpm

Detailed Content Unit Report

Example Response


{
    "errobj": null,
    "response": {
    "startts": 1320969600,
    "endts": 1324080000,
    "report": "ecpm",
    "game_id": [2102],
    "content_id": [1000107]
    "datapoints": [
        [
            1322092800,
            6.96
        ],
        [
            1322179200,
            8.54
        ],
        [
            1322265600,
            10.30
        ],
        ...
    },
    "error": null
}

Aggregate Detailed Content Unit Report

Description


Returns meta data and a list of data points for a given report type over a span of time across multiple content units. Each data point is represented by a time stamp and a value. Each point is spaced out according to granularity (day by default). This currently does not fill in the blanks if there is no data to return for the next point in the sequence.

Aggregate Detailed Content Unit Report

HTTP:GET


/report/game/<game_id:int>/content/aggregate/report/<report_type:str>

Aggregate Detailed Content Unit Report

Parameters


ParameterTypeDescription
game_id int The Game ID the report is associated with.
content_id int A list of comma separate content_id values to report against.
report_type string See the Detailed Content Report Types table.
auth Authentication token (authentication header may be used instead). Required

Aggregate Detailed Content Unit Report

Example Request


GET /report/game/1/content/aggregate/report/conversions?startts=1330560000&endts=1331164800&content=1,2,3

Aggregate Detailed Content Unit Report

Example Response


{
    "errobj": null,
    "response": {
        "startts": 1330560000,
        "endts": 1331164800,
        "datapoints": [
           [
           1330560000,
           544
           ],
           [
           1330646400,
           469
           ],
        ],
        "report": "conversions",
        "game_id": [
           1
        ],
        "content_id": [
           1,
           2,
           3
        ]
    },
"error": null
}