Data Download

Flurry understands that there are many possible reasons that you might need to retrieve the data that your apps send to Flurry. The Data Download service within Flurry supports the extraction of data on a periodic basis. You may want to use Data Download to:

  • Pull all data from Flurry into your internal reporting tools

  • See session level data for a specific day or dates

  • Debug data for specific events

  • Double-check your integration with Flurry

Flurry now offers two ways to get a download of your data:

  • Data Download via the Flurry portal

  • Data Download API

Data Download - Flurry Portal

(Note to Safari users — In order to use Data Download: On the Safari menu, select Preferences. On the General tab, find the “Open Safe Files After Downloading” feature (usually at the bottom). Uncheck the box to prevent .zip files from opening automatically.)

To access Data Download in Flurry, look for the link in the Sessions section in Analytics. To initiate a new request, click the “+ New Request]” button.

data_download

Requests

You may submit a Data Download request for any time period in the last 2 years of up to 30 days.

When you submit your request, you may choose from three data formats:

  • CSV

  • JSON

  • XML

If you want to receive an e-mail when your request is complete, choose Email Notification - Enabled.

data_download_create

Filters

You may filter your data download buy app version and/or events.

  • To filter by App Version, select “Add Filter.” Then select the versions you want data for.

  • To filter by Events, select “Add Filter.” Then select the events you want included in the data download.

Output

Once complete, you can download your data from the main Data Download screen. Most requests will complete in under ~10 minutes. You will see “Processing” in the Download Status column while your request is completing. Refresh the page periodically to check whether your download has completed.

Data Download API

Setup

In order to use the Data Download service, you must first create a Programmatic Token. You can read about how to do that here. Upon creation, the ~~YOUR TOKEN~~ will be enabled for Data Download API. You can manage the permissions for Programmatic users on the Admin > Users page by clicking the pencil icon.

Request

  1. Once you have your Programmatic Token, the process for requesting an extract involves doing a POST to an api at flurry. The following is an example call using cURL:

The following must be replaced with your own information:

  • ~~YOUR TOKEN~~ must be replaced with your Programmatic Token from the Setup section above.

  • startTime/endTime: Epochmilli timestamps communicating the time range for which sessions returned. Please note, this may not be longer than 30 days. In some cases, windows must be adjusted due to data volume. To learn more about this, refer to the Window Size Computation section below.

  • APIKey: The APIKey for the app for which you want to retrieve data. This can be viewed by Admin users on the Admin > Apps page in Flurry .

  • outputFormat: JSON, XML or CSV

Optional Attributes

There are a few optional parameters that may be included in order to filter the results:
  • App Versions - the results may be filtered for a collection of app versions using: “app_versions”:”11111,22222,33333”

  • Events - the results may be filtered to include only specific events using: “eventIds”:”44444444,55555555,66666666”

The IDs of App Versions and Events can be found using the Analytics Reporting API.

  1. If the request was successfully logged for processing, the response from this call should look like this:

From this response, the id value is the important one at the moment. The requestStatus is also important as if it does not say Acknowledged, something prevented the request from being successful (refer below for possible issues and error codes).

Polling for Status

  1. Using the value for the id key from the above, construct and send the following request by placing the id value before the ? (e.g. change ~~YOUR_REQUEST_ID~~ to the value of id you received in the response to your first request ) and including your token by replacing ~~YOUR TOKEN~~ with your programmatic token:

  1. While the request is processing, the response will be similar to the response in step 3. Periodically check the status of the request by re-submitting the request from step 3.

Note

Most requests will be ready and available for download within 30 minutes. However, requests for extremely large apps can take up to a few hours.

  1. When the request has been processed successfully, the s3URI key in the response include a URI for downloading the resulting data. For example:

Within the s3URI value is also the time by which you must download the file. After the time provided, the file will no longer be available and a new request will need to be submitted to retrieve the data.

Retrieving Results

  1. To retrieve the data, create a cURL statement with the s3URI value. For example:

Upon submitting the request, a file should be downloaded containing the data that fit the original request from step 2.

Responses

Initial Request Errors

On the initial request, there are a few reasons that a request might not be successful. In each of these cases, a response indicating the issue to be corrected will be returned.

Authorization

If the token provided does not have access to the requested data, the response will be similar to:

{"code":401,"message":"Unauthorized"}

Time Frame

If the time frame requested is not supported, the response will be similar to:

{"errors":["Cannot request report for a period greater than 31 days"]}

Request Status

The requestStatus communicates the current status of a request that was successfully received. The following are the possible states and their meanings:

  • Acknowledged: The request has been received and data is being processed

  • Failure: The request was not successfully processed for some reason. In this case, please try your request again and if it fails a second time, reach out to support@flurry.com

  • Success: The request was successfully processed, and the **s3URI **key should have the link for downloading the file

Errors while downloading the File

Expired Request

If you receive a response with the following body, the request needs to be created again using the request api. We normally store contents for up to 30 days:

{"data":{"type":"rawData","id":"26","attributes":{"requestStatus":"Success","s3URI":"Expired URI. Please resubmit request"}}}

Expired URLs

Once you get back a valid S3 URI but encounter the following error, this means that the presigned URL has expired. A simple GET call will refresh the presigned url and will last for 10 mins before it expired:

<Error>
   <Code>AccessDenied</Code>
   <Message>Request has expired</Message>
   <Expires>2017-12-12T17:53:55Z</Expires>
   <ServerTime>2018-01-31T19:47:36Z</ServerTime>
   <RequestId>14CE14DDCDF8E396</RequestId>
   <HostId>GMG6Z6Xtb2CZV45s9p1dpBCapu6vv/jmPXck89mXbmFsvzKirc/6T/s6SI5R18gIpspVFdsURQo=</HostId>
</Error>

Window size computation

We allow requests that are smaller than 1 month. However if the returned data is too large, we ask that you try with smaller start/End window sizes. For example if the requested data is for 1 month and we find that the data is too large, the error response will indicate an alternate window period (either 1 week or 1 day) which is guaranteed to work.

Data

There are three formats for the data, JSON, CSV and XML. (XML is via the UI only.) These formats include the same data fields described here:

  • sessionTimestamp - Represents the epochmilli when the session containing the event started.

  • appVersion - The version of the app.

  • sessionDuration - The duration of the session in milliseconds.

  • eventOffset - The number of milliseconds between the sessionTimestamp and the occurrence of the event.

  • deviceIdentifiers - A collection of device identifiers for the device that recorded the session.

  • deviceModel - The name of the model. Examples include iPhone X and Galaxy S9.

  • deviceSubModel - The device model code. Examples include iPhone10,2 and SM-G892U.

  • countryISO - The ISO country code from which the session originated.

  • eventName - The name of the event as recorded in Flurry.

  • eventParameters - A collection of key:value pairs containing the event parameters that were recorded along with the event.

  • userId - If your instrumentation utilized the Flurry.setUserId method to record an non-PII version of your user’s login id, it will be returned here.

  • gender - If your instrumentation utilized the Flurry.setGender method to record the indicated gender of the user, it will be returned here.

  • birthYear - If your instrumentation utilized the Flurry.setAge method to record the indicated age of the user, it will be returned here as the imputed birth year.

  • latitude - If GPS data was available on the device, the recorded latitude will be returned here in a truncated format.

  • longitude - If GPS data was available on the device, the recorded longitude will be returned here in a truncated format.

  • sessionProperties - If you recorded session properties using the Flurry.sessionProperties method to record information about the context of the session, the key/value pairs recorded will be included here.

JSON Format

The JSON output format includes a row for each event recorded. An example of a few events would be:

Notice that the session information for the first two lines are the same, indicating the came from the same session, while the third line is different, indicating it is from a new session.

CSV Format

The CSV format is very similar to the JSON format except that rather that being organized by key/value pairs, the data is organized by columns separated by commas. Please note that the eventParameters column is presented as a JSON object as the number of key/value pairs is variable.

XML Format

XML contains the same data as JSON/CSV in Extensible Markup Language format.