Batch Export Examples
This entry provides a step-by-step guideline on how to create a (raw) batch export of all event log for a given user.
Contents of the Table |
---|
Use Cases
Below a couple of use cases where raw data can be valuable:
- Visualize Customer Journey(s): Export all customer touchpoints collected for a given range of time and plot this to map the customer journey.
Batch Export Example
A step-by-step guide on how to implement the on-site pixel. General note on forehand: please make sure that you have been browsing on either one or multiple websites where the On-Site pixel is implemented and active so the DMP have stored data related to your user ID.
- Browse to http://go.flx1.com/debug to consult the Mapp User ID assigned to your profile (cookie). Given the example below the value is "cf173ec6-28a9-496d-5316-7860e1c95d29".
Configure the JSON query object array for the "x" parameter value as described in Batch Export Examples. This represents the scope of your analysis. Please review the example below and note the following:
[{ "dimensions": ["flx_timestamp", "flx_date", "flx_hour", "flx_uuid", "flx_pixel_id", "flx_event_type", "flx_interaction_type", "flx_interaction_value", "flx_segment_dmp", "flx_conversion_dmp", "flx_user_ip", "flx_user_ip_truncated", "flx_geo_country", "flx_geo_region", "flx_geo_city", "flx_geo_lat", "flx_geo_long", "flx_browser", "flx_browser_version", "flx_browser_language", "flx_browser_language_country", "flx_operating_system", "flx_operating_system_version", "flx_device_type", "flx_device_brand", "flx_referer_url", "flx_event_referer_url", "flx_event_url", "flx_site_domain", "flx_external_pixel_id", "flx_external_data"], "measures": ["flx_total_events_dmp"], "filters": [{ "dimension": "date", "date_start": "2016-08-16", "date_end": "2016-08-16" }, { "dimension": "flx_uuid", "include": ["cf173ec6-28a9-496d-5316-7860e1c95d29"] }], "column_headers": 1, "column_separator": ",", "callback_id": "", "limit": "1000", "order": [{ "key": "flx_timestamp", "order": "asc" }] }]
- Dimensions: This includes all relevant Batch Export Examples that can be exported. By including "flx_timestamp" and "flx_uuid" you automatically access the raw logs since these values are likely unique for each and every event.
- Measures: Not relevant here since we want to export the raw logs but in case of an 'aggregated' data export a measures automatically enumarates the events relevant to the included dimensions.
- Filters: The analysis will be limited to a subset of data due to the configured filters. In this example we only retrieve data for just one day (2016-08-16) and one individual User ID (cf173ec6-28a9-496d-5316-7860e1c95d29).
- Limit: The actual export will be limited to a subset of data by setting the result limit to the first 1000 events based on the "order" key.
- Order: The results of the query will be ordered according to this key. In this case the (raw) data events in the batch export file will be ordered based on the timestamp of the event in a descending order.
- Go to the API Playground feature within your DMP account.
- Load the "Batch Export" template from the Examples menu. Note that he appropriate service is "/viz/batch-export".
- Include the JSON query object array as value for the "x" key. This configuration can be obtained from step 2. Make sure the JSON is validated. The JSON does not need to be url encoded when using the API Playground, as the API Playground will handle the url encoding for you.
- Click on "Execute" to run the API call.
- As a result the API response will provide you of a batch export ID in case the "status" was "OK".
- Once the batch export is completed you can either:
- Download the file from the "Exports" feature in the UI: https://platform.flxone.com/batch-export.
- Download the file by making a GET request to the following API endpoint: "/viz/export?id=<id>".
Tools
The following or tools can be considered as handy for taking care of the below.
Name | Purpose | Link |
---|---|---|
JSONLint | Insert JSON and validate | http://jsonlint.com/ |
URL Decoder/Encoder | Decode/Endode URLs | http://meyerweb.com/eric/tools/dencoder/ |
Troubleshooting
If your data export fails, you can try to limit the date range so that a smaller amount of data is returned.
Also, you can try to reduce the number of measures and/or dimensions being requested.