Skip to main content

Swrve Export API guide

The Swrve Export APIs enable you to export data from the Swrve service. These APIs enable the export of KPI, item sales, event count, and campaign data.

warning

NeverΒ call the Export API from within your app. The Export API is hosted in the Swrve dashboard and not designed for high levels of traffic.

In addition to the app's API key you must also provide a personal key to access the export APIs. For more information, see Where do I find my API Key and personal key?

info

This article references Swrve's URLs for all data and content stored in both our US and EU data centers. Click the relevant tab based on your app configuration. For more information, see How do I configure the Swrve SDK for EU data storage?


KPI export​

The Swrve Export API enables you to export KPI data from the Swrve service. All of the KPI data that is displayed in Swrve is available through this REST API. The data is available in JSON and HTML format. The HTML data produces a table, which is especially useful for performing Excel web queries or for import into Google Spreadsheets. To request JSON data, add .json to the end of the URL. To request HTML data, add .html.

Call all of the API calls below with HTTP GET. All of the URLs share a common root: https://dashboard.swrve.com/api/1/exporter/kpi (or https://eu-dashboard.swrve.com/api/1/exporter/kpi for EU-configured apps).

Get DAU in a specific format:

Common URL parameters​

The following parameters are used by all calls in the KPI Exporter API:

ParameterPresenceDescription
api_keyRequiredThe API key for the given app.
personal_keyRequiredThe personal key for your user login.
historyRequired (if start is not used)This parameter is used in conjunction with the specified granularity to fetch the N last data points starting from the current date. For example, if history is set to 8 and the hour granularity is specified, then the data points of the last 8 hours are fetched.
startRequired (if history is not used)The start date of the date range from which data is fetched. The following date formats are supported: yyyy, yyyy-mm, yyyy-mm-dd, yyyy-mm-dd-hh. All dates use the local timezone of the app.
stopOptionalThe end date of the date range from which data is fetched. Only set the end date if a start date is specified. The following date formats are supported: yyyy, yyyy-mm, yyyy-mm-dd, yyyy-mm-dd-hh. All dates use the local timezone of the app. If no end date is specified, the current time is used by default.
segmentOptionalThe segment from which data is to be fetched. If no segment is specified, data from all users is fetched by default.
granularityOptionalThe temporal granularity of the fetched data. The granularities supported by each KPI are listed in the table below. The default granularity is denoted with an asterisk. The granularity 24hour_rolling is calculated over the proceeding 24 hours reported hourly. The granularity 30day_rolling is calculated over the preceding 30 days reported daily.
transposeOptionalThis parameter is only relevant for the .html version of this call. If set to true, the columns and rows of the generated table are switched. This parameter is set to false by default.
only_dataOptionalThis parameter is only relevant for the .html version of this call. If set to true, the row and column headers of the generated table are removed. This parameter is set to false by default.

Extra parameters​

The following parameter is only required for some API calls. The documentation for each call below specifies if these extra parameters are required.

ParameterPresenceDescription
currencyOptionalThe virtual currency of interest. If no currency is specified, data is fetched from all virtual currencies.

KPIs​

NameAPISupported granularity
Default is marked with *
Extra parameters
DAUdauday*, 24hour_rolling
MAUmau30day_rolling
DAU / MAUdau_mauday
New Usersnew_usershour, day*, 24hour_rolling, month, year
Daily Paying Usersdpuday, 24hour_rolling
Conversionconversionhour, day*, 24hour_rolling, month, year
Revenuedollar_revenuehour, day*, 24hour_rolling, month, year
Currency Spentcurrency_spenthour, day*, 24hour_rolling, month, yearcurrency
Currency Spent / DAUcurrency_spent_dauday*, 24hour_rollingcurrency
Currency Purchasedcurrency_purchasedhour, day*, 24hour_rolling, month, yearcurrency
Currency Purchased / DAUcurrency_purchased_dauday*, 24hour_rollingcurrency
Currency Givencurrency_givenhour, day*, 24hour_rolling, month, yearcurrency
Items Purchaseditems_purchasedhour,day*, 24hour_rolling, month, yearcurrency
Items Purchased / DAUitems_purchased_dauday*, 24hour_rollingcurrency
Session Countsession_counthour, day*, 24hour_rolling, month, year
Avg Session Lengthavg_session_lengthhour, day*, 24hour_rolling, month, year
Day N Retentionday_retentionhour, day, 24hour_rolling, month, year
ARPU Dailyarpu_dailyday*, 24hour_rolling
ARPPU Dailyarppu_dailyday*, 24hour_rolling
ARPU Monthlyarpu_monthly30day_rolling
ARPPU Monthlyarppu_monthly30day_rolling
Avg Playtimeavg_playtimeday*, 24hour_rolling
Day 1 Reengagementday1_reengagementhour, day*, 24hour_rolling, month, year
Day 3 Reengagementday3_reengagementhour, day*, 24hour_rolling, month, year
Day 7 Reengagementday7_reengagementhour, day*, 24hour_rolling, month, year

Examples​

Get DAU for a specific time range:

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "start=2011-06-20" -d "stop=2011-06-22" -d "granularity=day"
https://dashboard.swrve.com/api/1/exporter/kpi/dau.json

Get MAU for the last 60 days (30day_rolling granularity):

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "history=60" https://dashboard.swrve.com/api/1/exporter/kpi/mau.json

Get Currency Spent for the coins currency in the TopPlayers segment:

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "start=2011-06-20" -d "stop=2011-06-22" -d "segment=TopPlayers"
-d "currency=coins" -d "granularity=day"
https://dashboard.swrve.com/api/1/exporter/kpi/currency_spent.json

Get Avg Session Length in HTML format, transposed and without data labels:

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "start=2011-06-20" -d "stop=2011-06-22" -d "granularity=day"
-d "transpose=true" -d "only_data=true"
https://dashboard.swrve.com/api/1/exporter/kpi/avg_session_length.html

Get Day 1 Retention (or Day N Retention):

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "start=2011-06-20" -d "stop=2011-06-22" -d "granularity=day"
https://dashboard.swrve.com/api/1/exporter/kpi/day1_retention

Get Day7 Retention (or Day N Retention):

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "start=2011-06-20" -d "stop=2011-06-22" -d "granularity=day"
https://dashboard.swrve.com/api/1/exporter/kpi/day7_retention

Get Avg Playtime for last two days in 24hour_rolling granularity:

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "history=48" -d "granularity=24hour_rolling"
https://dashboard.swrve.com/api/1/exporter/kpi/avg_playtime.json

Error codes​

If an error occurs while processing the request, you may receive one or more of the the following error codes and need to make sure your integration is equipped to handle error conditions.

CodeTextDescription
400Invalid ParameterThe request included an invalid parameter, based on the specification.
404Invalid API KeyCheck that your API key is correct.
429Rate Limit ExceededSlow down the request rate.
503Service UnavailableAn error occurred on the Swrve server side. Attempt to send the request at a later time, if possible.

Event export​

The Swrve Export API enables you to export event count information from the Swrve service.

The data is available in JSON and HTML format. The HTML data produces a table, which is especially useful for performing Excel web queries or for import into Google Spreadsheets. To request JSON data, add .json to the end of the URL. To request HTML data, add .html.

Call all of the API calls below with HTTP GET. All of the URLs share a common root: https://dashboard.swrve.com/api/1/exporter/event/ (https://eu-dashboard.swrve.com/api/1/exporter/event/)

Common URL parameters​

The following parameters are used by all calls in the Event Export API:

ParameterPresenceDescription
nameRequiredThe name of the event to be queried.
api_keyRequiredThe API key for the given app.
personal_keyRequiredThe personal key for your user login.
historyRequired (if start is not used)This parameter is used in conjunction with the specified granularity to fetch the N last data points starting from the current date. For example, if history is set to 8 and the hour granularity is specified, then the data points of the last 8 hours are fetched.
startRequired (if history is not used)The starting date of the date range from which data is fetched. The following date formats are supported: yyyy, yyyy-mm, yyyy-mm-dd, yyyy-mm-dd-hh. All dates use the local timezone of the app.
stopOptionalThe end date of the date range from which data is fetched. Only set the end date if a start date is specified. The following date formats are supported: yyyy, yyyy-mm, yyyy-mm-dd, yyyy-mm-dd-hh. All dates use the local timezone of the app. If no end date is specified, the current time is used by default.
segmentOptionalThe segment from which data is to be fetched. If no segment is specified, data from all users is fetched by default.
granularityOptionalThe temporal granularity of the fetched data, set to day by default. Event export calls support month, day, and hour only.
transposeOptionalThis parameter is only relevant for the .html version of this call. If set to true, the columns and rows of the generated table are switched. This parameter is set to false by default.
only_dataOptionalThis parameter is only relevant for the .html version of this call. If set to true, the row and column headers of the generated table are removed. This parameter is set to false by default.

Event count​

This API call gets the event count for a named event.

URL​

Example​

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "start=2011-06-20" -d "stop=2011-06-22" -d "name=Swrve.session.start"
https://dashboard.swrve.com/api/1/exporter/event/count

Event list​

This API call gets a list of the event names that have been received by Swrve from the event API. This API should be used to enumerate a list of all event names so that they can be passed to the event count API. This API call supports the JSON and HTML formats like all other calls in the export API. The following parameters are not required: history, start, stop, segment, and granularity.

The output is a list of event names (which match the names set in the incoming event API requests), where event API could be a link to the event API.

URL​

Example​

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
https://dashboard.swrve.com/api/1/exporter/event/list

Payload count​

This API call gets the event payload counts for a named event and payload/key pair. This method enables you to export the data buckets that are displayed on the Events Overview screen.

The only granularity supported by this function is day.

URL​

Example​

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "start=2011-06-20" -d "stop=2011-06-22" -d "name=Swrve.session.start"
-d "payload_key=foo" https://dashboard.swrve.com/api/1/exporter/event/payload

Payload key list​

This API call gets a list of the event payload key names that have been received by Swrve from the event API. Use this API to enumerate a list of all event payload key names so that they can be passed to the payload count API. This API supports the JSON and HTML formats like all other calls in the export API. The following parameters are not needed: history, start, stop, segment, and granularity.

The return value is a list of string names that correspond to the payload_key parameter of named events sent to Swrve using the event API.

URL​

Example​

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
-d "name=Swrve.session.start" https://dashboard.swrve.com/api/1/exporter/event/payloads

Error codes​

See KPI Export.


User cohorts export​

This API call gets the specified cohort_type data for daily cohorts for the days specified. A user cohort represents a section of users who start using the app on a particular day. You can view data for those users for the 30 days after they joined and compare this to other users starting on other days. You can get the following information for any cohort:

  • Retention - the number of retained users.
  • Avg Sessions - the average number of sessions started per retained user.
  • Avg Playtime - the average session length per retained user.
  • Avg Revenue - the average revenue generated per retained user.
  • Total Revenue - the total revenue generated.

The data is available in JSON and HTML format. The HTML data produces a table, which is especially useful for performing Excel web queries or for import into Google Spreadsheets. To request JSON data, add .json to the end of the URL. To request HTML data, add .html.

Call the API below with HTTP GET. The URL has the root: https://dashboard.swrve.com/api/1/exporter/cohorts/daily (https://eu-dashboard.swrve.com/api/1/exporter/cohorts/daily)

Common URL parameters​

The following parameters are used by all calls in the User Cohorts Export API:

ParameterPresenceDescription
cohort_typeRequiredThe type of cohort data to be returned. Must be one of retention, avg_sessions, avg_playtime, avg_revenue and total_revenue.
api_keyRequiredThe API key for the given app.
personal_keyRequiredThe personal key for your user login.
startoptionalThe starting day of the date range from which data is fetched in the format: yyyy-mm-dd. If no start date is specified, the last 30 days are fetched.
stopOptional (required if start is specified)The end date of the date range from which data is fetched in the format: yyyy-mm-dd.
segmentOptionalThe segment from which data is to be fetched. If no segment is specified, data from all players is fetched by default.

Example​

curl -G -d "cohort_type=retention" -d "api_key=<api key>" 
-d "personal_key=<personal key>" -d "start=2011-06-20" -d "stop=2011-06-22"
https://dashboard.swrve.com/api/1/exporter/cohorts/daily

Error codes​

See KPI Export.


Item sales export​

The Swrve Export API enables you to export item sales data from the Swrve service.

The data is available in JSON and HTML format. The HTML data produces a table, which is especially useful for performing Excel web queries or for import into Google Spreadsheets. To request JSON data, add .json to the end of the URL. To request HTML data, add .html.

Call the API below with HTTP GET. All of the URLs will share a common root: https://dashboard.swrve.com/api/1/exporter/item/ (https://eu-dashboard.swrve.com/api/1/exporter/item/)

Common URL parameters​

The following parameters are used by all calls in the Item Sales Export API:

ParameterPresenceDescription
api_keyRequiredThe API key for the given app.
personal_keyRequiredThe personal key for your user login.
historyRequired (if start is not used)This parameter is used in conjunction with the specified granularity to fetch the N last data points starting from the current date. For example, if history is set to 8 and the hour granularity is specified, then the data points of the last 8 hours are fetched.
startRequired (if history is not used)The starting date of the date range from which data is fetched. The following date formats are supported: yyyy, yyyy-mm, yyyy-mm-dd, yyyy-mm-dd-hh. All dates use the local timezone of the app.
stopOptionalThe end date of the date range from which data is fetched. The end date should only be set if a start date is specified. The following date formats are supported: yyyy, yyyy-mm, yyyy-mm-dd, yyyy-mm-dd-hh. All dates use the local timezone of the app. If no end date is specified, the current time is used by default.
segmentOptionalThe segment from which data is to be fetched. If no segment is specified, data from all users is fetched by default.
granularityOptionalThe temporal granularity of the fetched data, set to day by default. Item sales export calls support year, month, and day only.
transposeOptionalThis parameter is only relevant for the .html version of this call. If set to true, the columns and rows of the generated table are switched. This parameter is set to false by default.
only_dataOptionalThis parameter is only relevant for the .html version of this call. If set to true, the row and column headers of the generated table are removed. This parameter is set to false by default.

Extra parameters​

The following parameters are only required for some API calls. The documentation for each call below specifies whether these extra parameters are required.

ParameterPresenceDescription
uidOptionalThe UID of the item that you want to fetch data from. If no UID or tag is specified, all items are returned.
tagOptionalThe tag of the items that you want to fetch data from. If no UID or tag is specified, all items are returned.
currencyOptionalThe virtual currency of interest. If no currency is specified, data is fetched from all virtual currencies.

Item sales​

This API call gets the sales data of a particular item.

URL​

Extra parameters​

uid, tag, currency

Example​

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" -d "uid=sword" 
-d "start=2011-06-20" -d "stop=2011-06-22" -d "segment=Ireland" -d "currency=gold"
-d "granularity=day" -d "transpose=true" -d "only_data=true"
https://dashboard.swrve.com/api/1/exporter/item/sales

Item revenue​

This API call gets the revenue data of a particular item.

URL​

Extra parameters​

uid, tag, currency

Example​

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" -d "uid=sword" 
-d "start=2011-06-20" -d "stop=2011-06-22" -d "segment=Ireland" -d "currency=gold"
-d "granularity=day" -d "transpose=true" -d "only_data=true"
https://dashboard.swrve.com/api/1/exporter/item/revenue

Item tag​

This API call gets the UIDs of all items that are associated with a particular tag.

URL​

Extra parameters​

tag

Example​

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" -d "tag=test_tag" 
-d "transpose=true" -d "only_data=true"
https://dashboard.swrve.com/api/1/exporter/item/tag

Error codes​

See KPI Export.


Segment list​

This API call gets a list of the segment names that have been created for this app. This API supports the JSON and HTML formats like all other calls in the export API. The return value is a list of string names that correspond to the name parameter of segments created for this app.

The data is available in JSON and HTML format. The HTML data produces a table, which is especially useful for performing Excel web queries or for import into Google Spreadsheets. To request JSON data, add .json to the end of the URL. To request HTML data, add .html.

Call the API below with HTTP GET. The URL has the root: https://dashboard.swrve.com/api/1/exporter/segment/list (https://eu-dashboard.swrve.com/api/1/exporter/segment/list)

Common URL parameters​

The following parameters are used by all calls in the Segment list API:

ParameterPresenceDescription
api_keyRequiredThe API key for the given app.
personal_keyRequiredThe personal key for your user login.
transposeOptionalThis parameter is only relevant for the .html version of this call. If set to true, the columns and rows of the generated table are switched. This parameter is set to false by default.
only_dataOptionalThis parameter is only relevant for the .html version of this call. If set to true, the row and column headers of the generated table are removed. This parameter is set to false by default.

Example​

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
https://dashboard.swrve.com/api/1/exporter/segment/list

Error codes​

See KPI Export.


User database export​

The User DB Downloads screen enables you to download data sets reflecting different properties of your users. For apps with a large number of users, these data sets are further split into multiple files. The export API for user DB downloads provides a list of all the available data and schema files, enabling you to automate the download of the data sets in which you are interested. For more information about the User DB Downloads screen, see Manually downloading user DBs.

Call this API call with HTTP GET. The URL has the root: https://dashboard.swrve.com/api/1/userdbs.json (https://eu-dashboard.swrve.com/api/1/userdbs.json)

Common URL parameters​

The following parameters are used by all calls in the User DB Export API:

ParameterPresenceDescription
api_keyRequiredThe API key for the given app.
personal_keyRequiredThe personal key for your user login.

File list​

This API call returns a JSON object that lists the URLs of the various data and schema files for the different data sets. This JSON takes the following format:

{
"data_files":{
"items_purchased": ,
"custom_properties": ,
"abtest_exposure": ,
"segment_membership": ,
"events_fired": ,
"swrve_events_fired": ,
"swrve_properties":
},
"schemas":{
"redshift":"",
"mysql":""
},
"date":""
}

where:

  • DATA_URL_* is the URL of a Gzipped CSV data file.
  • SCHEMA_URL is the URL of an SQL definition file.
  • DATE is the date of the latest update.

For example, to download the custom events fired for all users, loop through the data URLs referred to in this JSON contained list:

obj["data_files"]["events_fired"]

You must append your app ID, personal key and API key to the URL of each file request. For example:

https://dashboard.swrve.com/api/1/userdbs/downloads/2020-02-12/all-users_01234_2020-02-12_items_purchased.1_0.1.csv.gz?api_key=<API key>&personal_key=<personal key>

URL​

Example​

curl -G -d "api_key=<api key>" -d "personal_key=<personal key>" 
https://dashboard.swrve.com/api/1/userdbs.json

Error codes​

See KPI Export.


Campaign metadata​

Swrve provides two APIs for mapping tracking events for Swrve campaign touchpoints to the relevant campaign data, such as name, dashboard URL, start date, and so forth.

Depending on the channel and action type, these Swrve campaign events are logged in two formatsβ€”Generic or Custom. For more details on which channel/actions map to which format, see Raw event data schema.

Additionally, Swrve provides a third API for mapping in-app message events - click, navigation, and dismiss - to their associated actions, such as deeplink, copy-to-clipboard, page navigation, and permission requests.

Call the API below with HTTP GET. All of the metadata URLs will share a common root:

https://dashboard.swrve.com/api/1/exporter/campaign_meta_data/ (https://eu-dashboard.swrve.com/api/1/exporter/campaign_meta_data/)

Common URL parameters​

The following parameters are used by all calls in the Campaign Metadata API:

ParameterPresenceDescription
api_keyRequiredThe API key for the given app.
personal_keyRequiredThe personal key for your user login.

Generic campaign events API​

This is the API for retrieving a mapping between the tracking ID in generic campaign events and campaign metadata.

URL​

Example​

curl -LOJG --compressed -d "api_key=<api key>" -d "personal_key=<personal key>" 
https://dashboard.swrve.com/api/1/exporter/campaign_meta_data/generic_campaign_events.csv

Tracking ID mapping​

This returns a CSV file that maps tracking IDs in generic campaign events to campaign metadata for all campaigns that are scheduled, active, or finished.

By uploading this table into a local store, you can map tracking IDs and campaign types to appropriate contextual information in your local reports.

Each campaign may have more than one tracking ID for platforms, locales, or test variants, where applicable.

The columns in this CSV file are:

ColumnDescription and possible values
Tracking IDUnique individual message ID used in events.
Campaign TypeThe channel or type of campaign, as covered by the filters on the Campaigns page:

Quick Push, Push Via Api, Geo Push, Push, Other
VariantThe campaign variant, if applicable. For example, A, B, C. If the campaign does not include variants, the cell will be empty.
LocaleIf the campaign is localized, values will include all language variants. For example, English, Spanish, French, All Languages (Default). If the campaign does not include localized variants, the cell will be empty.
PlatformThe platform(s) the campaign was sent to. For example, All, iOS, Android, Web, Amazon.
Schedule TypeFor scheduled batch campaigns (push), the option selected for the the time the campaign was scheduled to be sent. For example, global (same time worldwide), optimal (user's optimal time), local (specific time in the user's timezone).
For in-app message and embedded campaigns, the cell will be empty.
Start DateIf specified, the scheduled campaign start date. If not specified, the cell will be empty.
End DateIf specified, the scheduled campaign end date. If not specified, the cell will be empty.
Earliest DeliveredThe date and time the first notification was sent.
Latest DeliveredThe date and time the most recent notification was sent.
ArchivedIndicates if the campaign is archived. Possible values are true, false.
DeletedIndicates if the campaign has been deleted. Possible values are true, false.
SilentIndicates if the campaign is a background update, or silent notification. Possible values are true, false
Campaign IDParent Campaign ID, as displayed in the Swrve dashboard URL for a particular campaign.
Campaign NameName of the campaign when created in the Swrve dashboard.
Campaign DescriptionDescription of the campaign when created in the Swrve dashboard.
Campaign URLThe URL link for the campaign in the Swrve dashboard.
Campaign StatusThe current status of the campaign. Possible values are active, archived, draft, failed, inactive, scheduled, sending, sent.
Created Via ApiIndicates if the campaign was created via one of Swrve's campaign APIs. Possible values are true, false.
TagsAll tags associated with the campaign.
Primary Goal TypeIf set during campaign creation, the type of event for your primary goal. Possible values are event, purchase (in-app purchase), valid_iap (purchase).
Primary Goal ValueThe event name for the primary goal. For example, flight.search.
Secondary Goal TypeIf set during campaign creation, the type of event for your secondary goal. Possible values are event, purchase (in-app purchase), valid_iap (purchase).
Secondary Goal ValueThe event name for the secondary goal. For example, flight.booked.
Attribution Window HoursThe time during which any goals you set for the campaign are attributed back to a user, in hours.
App IDThe Swrve app ID, as encoded in the Swrve Dashboard URL.
App NameThe name of the app in your Swrve dashboard.
Company NameThe name of your company in the Swrve dashboard.

The filename format is:Β campaign-meta-data-generic---.csv

where:

  • APP_ID is the Swrve app ID, as encoded in the Swrve Dashboard URL
  • CURRENT_DATE is a date/time-stamp
  • RANDOM_STRING is a random string

Example: campaign-meta-data-generic-12345-2020-03-30_14-03-07-31f44b88388852cc.csv

Custom campaign events API​

This is the API for retrieving a mapping between the tracking ID in custom campaign events and campaign metadata.

URL​

Example​

curl -LOJG --compressed -d "api_key=<api key>" -d "personal_key=<personal key>" 
https://dashboard.swrve.com/api/1/exporter/campaign_meta_data/custom_campaign_events.csv

Tracking event mapping​

This returns a CSV file mapping custom Swrve campaign events to campaign metadata for all campaigns that are scheduled, active, or finished.

By uploading this table into a local store, you can map these event names to appropriate contextual information in your local reports.

Each campaign may have more than tracking event for platforms, locales, or test variants, where applicable.

This will return a CSV file with the following columns:

ColumnDescription
S3 event nameThis is the event name as recorded in the raw AWS S3 logs.

For example, Swrve.Messages.Push-123.engaged

This event name encodes the channel (push), action (engaged), and message ID (123).
UserDB column nameThis is the corresponding event name as used in the Swrve Events User Database export (push, in-app messages, and embedded campaigns only).

For example, swrve_messages_push-1_engaged
ActionThe action the user has taken, for example, engaged.
Tracking IDUnique individual message ID used with the campaign type.
Campaign TypeThe campaign channel, for example InAppMessage, Push, EmbeddedCampaign.
VariantThe campaign variant, if applicable. For example, A, B, C. If the campaign does not include variants, the cell will be empty.
LocaleIf the campaign is localized, values will include all language variants. For example, English, Spanish, French, All Languages (Default). If the campaign does not include localized variants, the cell will be empty.
PlatformThe platform(s) the campaign was sent to. For example, All, iOS, Android, Web, Amazon.
Schedule TypeFor scheduled batch campaigns (push), the option selected for the the time the campaign was scheduled to be sent. For example, global (same time worldwide), optimal (user's optimal time), local (specific time in the user's timezone).

For in-app message and embedded campaigns, the cell will be empty.
Start DateIf specified, the scheduled campaign start date. If not specified, the cell will be empty.
End DateIf specified, the scheduled campaign end date. If not specified, the cell will be empty.
Campaign IDParent Campaign ID, as displayed in the Swrve dashboard URL for a particular campaign.
Campaign NameName of the campaign when created in the Swrve dashboard.
Campaign DescriptionDescription of the campaign when created in the Swrve dashboard.
Campaign URLThe URL link for the campaign in the Swrve dashboard.
Campaign StatusThe current status of the campaign. Possible values are active, archived, draft, failed, inactive, scheduled, sending, sent.
Created Via ApiIndicates if the campaign was created via one of Swrve's campaign APIs. Possible values are true, false.
TagsAll tags associated with the campaign.
Primary Goal TypeIf set during campaign creation, the type of event for your primary goal. Possible values are event, purchase (in-app purchase), valid_iap (purchase).
Primary Goal ValueThe event name for the primary goal. For example, flight.search.
Secondary Goal TypeIf set during campaign creation, the type of event for your secondary goal. Possible values are event, purchase (in-app purchase), valid_iap (purchase).
Secondary Goal ValueThe event name for the secondary goal. For example, flight.booked.
Attribution Window HoursThe time during which any goals you set for the campaign are attributed back to a user, in hours.
App IDThe Swrve app ID, as encoded in the Swrve Dashboard URL.
App NameThe name of the app in your Swrve dashboard.
Company NameThe name of your company in the Swrve dashboard.

The filename format is:Β campaign-meta-data-custom---.csv

where:

  • APP_ID is the ID of the app as encoded in Swrve dashboard URL
  • CURRENT_DATE is a date/time-stamp
  • RANDOM_STRING is a random string

Example: campaign-meta-data-custom-12345-2020-03-30_14-03-07-31f44b88388852cc.csv

In-app button metadata API​

This is the API for retrieving a mapping between the button ID in events and in-app message button data.

URL​

Example​

curl -LOJG --compressed -d "api_key=<api key>" -d "personal_key=<personal key>" 
https://dashboard.swrve.com/api/1/exporter/campaign_meta_data/in_app_button_meta_data.csv

Button mapping​

This returns a CSV file that maps the button IDs in in-app message campaign events to button metadata. The CSV file only includes data for in-app message campaigns that are scheduled active, inactive, or archived. The button ID is only unique per page ID, which is only unique per Tracking ID. When mapping the button metadata file to campaign events, you must join on all three IDs.

By uploading this table into a local store and joining with Swrve's raw event data, you can create your own comprehensive button click report, complete with specific button actions.

The columns in this CSV file are:

ColumnDescription
Campaign IDParent Campaign ID, as displayed in the Swrve dashboard URL for a particular campaign.
Tracking IDUnique individual variant ID used with the campaign.
Page IDIndividual Page ID, unique per variant (Tracking ID). Maps to the contextId in click, dismiss, and navigation events
Page NameName of the page.
Button IDIndividual Button ID, unique per each page (Page ID) per variant (Tracking ID). Maps to the buttonId in click, dismiss, and navigation events.
Button NameThe name of the button, as defined in the campaign.
Action TypeThe button's action, executed when the user interacts with the button. One of the following:
- copy_to_clipboard: copies the value to the device's clipboard
- deeplink: opens the app to a specified deeplink URL
- dismiss: dismisses the in-app message
- open_app_settings: directs the user to the app's settings page
- open_notification_settings: directs the user to the app's notification settings page
- page_open: directs the user to another page in multi-page campaigns
- request_permission: requests a device permission
- start_geo_sdk: initializes Swrve's Geo SDK, if integrated.
Action ValueFor applicable action types, the action's specific value:
- copy_to_clipboard: the value copied to the device's clipboard
- deeplink: the button's deeplink value, typically a URL
- page_open: the Page ID the button opens to
- request_permission: the device permission requested

The filename format is:Β campaign-meta-data-in_app_button_meta_data---.csv

where:

  • APP_ID is the ID of the app as encoded in Swrve dashboard URL
  • CURRENT_DATE is a date/time-stamp
  • RANDOM_STRING is a random string

Example: campaign-meta-data-in_app_button_meta_data-1030-2023-10-19_15-52-11-5de231e0b8802aab.csv

Error codes​

See KPI Export.