get_geo_analytics

Gets the countries or regions associated with a given tracker or publisher ID. This includes basic statistics aggregated over the specified timeframe. A returned country value can be used in other method calls (where supported) as the dimdetail parameter.

Explorer

Explore this method

Request URL

http://api.tubemogul.com/api/v3/

HTTP method

GET

Arguments

NOTE: A dim value of country cannot be specified.

scope (string)
The scope of the method being called. Valid values are tracker or publisher.
id (string)
The ID corresponding to the scope of the report.
start (string)
The start date for the report. Format is YYYY-MM-DD.
end (string)
The end date for the report. Format is YYYY-MM-DD.
site_id (string) — Optional
The ID for your site. This is required for publisher-scoped queries but not for trackers. Contact us if you do not know your site_id.
detail (string) — Optional
Specifies the level of detail of the response. Valid values include: country, state or city. Defaults to country. See table below for interaction with country, state and city parameters.
country (string) — Optional
Specifies a country to scope the response. See table below.
state (string) — Optional
Specifies a state to scope the response. See table below.
city (string) — Optional
Specifies a city to scope the response. See table below.
sort (string) — Optional
The sort order of the list. Valid values include: views, viewed_minutes. Defaults to views.

detail country state city Description
country empty n/a n/a List stats for all countries
country specified n/a n/a List stats for a single country
state empty n/a n/a List stats for all states for all countries
state specified empty n/a List stats for all states for a single country
state specified specified n/a List stats for a single state in a single country
city empty empty empty List stats for all cities for all countries
city specified empty empty List stats for all cities for a single country
city specified specified empty List stats for all cities for a single state in a single country
city specified specified specified List stats for a single city in a single state in a single country

Table: Interaction of detail, country, state and city parameters


Response Parameters

views (integer)
The number of views over the specified date range. A view is defined as when the video is actually played, i.e. when play is called on the Flash video object.
viewed_minutes (integer)
The total viewed minutes over the specified date range.
details (list)
A list of countries and/or regions with the following parameters for each. The entries will scoped based on the arguments provided in the request.
country (string)
The country where the views originated from.
country_code (string)
The ISO-3166 country code where the views originated from, with the addition of:
A1 for Anonymous Proxies. Does not include Open Proxy detection.
A2 for Satellite Providers
EU for Europe
AP for Asia/Pacific Region
In addition, we map overseas military bases to US
country_lat (number)
An approximate latitude value for the country.
country_long (number)
An approximate longitude value for the country.
state (string)
If detail=state or detail=city the state or region the views originated from. For US/Canada, this is the ISO-3166-2 code for the state/province name, with the addition of AA, AE, and AP for Armed Forces America, Europe and Pacific. Outside of the US and Canada the FIPS 10-4 number code is provided.
state_lat (number)
An approximate latitude value for the state.
state_long (number)
An approximate longitude value for the state.
city (string)
If detail=city, the city where the views originated from.
city_lat (number)
An approximate latitude value for the city.
city_long (number)
An approximate longitude value for the city.
views (integer)
The number of times all videos were viewed by this country or region. A view is defined as when the video is actually played, i.e. when play is called on the video object.
viewed_minutes (integer)
The total viewed minutes for all videos by this country or region.

Example Response

http://api.tubemogul.com/api/v3?date=1230109922&user_id=123456
&scope=tracker&id=TD-PEX-222&method=get_geo_analytics&sort=views&start=2008-12-10
&end=2008-12-31&index=1&max_results=20&auth=aa6fb416b3cac7861be9c9db2ebeef564b70f2e4

<response name="get_geo_analytics" status="ok">
  <details has_more_items="true" list_size="225" count="20">
    <entry>
      <country_code>US</country_code>
      <country>United States</country>
      <views>8113084</views>
      <viewed_minutes>30025859</viewed_minutes>
    </entry>
    ...
    <entry>
      <country_code>DK</country_code>
	  <country>Denmark</country>
      <views>107858</views>
      <viewed_minutes>372974</viewed_minutes>
    </entry>
  </details>
</response>

Error Codes

Standard error codes