Last modified November 6, 2015 by John Kearney

Export Facebook Custom Audiences

The Swrve Dashboard provides powerful, actionable insights into your users’ behavior and enables you to use this data to engage and re-engage the user. It is also useful to use Swrve data to re-engage users outside the Swrve platform or find corresponding audiences using tools like Facebook’s Custom Audiences. The Swrve User DB data enables you to do this. This article describes how to use the Swrve User DB data for Facebook Custom Audience creation.


Prerequisites

This guide presents an area of advanced analysis, so ensure you have completed the following:

  • Fully instrumented Swrve into your app.
  • Downloaded the Swrve User DB and loaded it into a database to allow querying. For a tutorial on how to automate this loading process, see Automating UserDB Imports.
  • You are sending a mobile advertising ID such as IDFA, Android Advertising ID or Facebook App User ID to Swrve.

For the purpose of this tutorial, the advertising identifier is sent to Swrve as a custom user property called advertising_id. In your Swrve instrumentation, you may be sending more than one advertising ID and may have names like idfa, android_advertising_id, facebook_id, and so forth for these identifiers.


Swrve Segments

To start, let’s look at a sample Swrve Segment.

Screen Shot 2015-11-05 at 4.30.39 PM

The KPI Report shows important details about your segments.


Exporting Lists of Users and Advertising IDs by Segment

A good first step to take with Swrve User DB data is to attempt to replicate the data in the Swrve KPI Report with an SQL query. Since the Swrve Dashboard updates multiple times a day and the User DB exports update only once every 24 hours, there are discrepancies between the two reports. It’s good to understand this as a baseline so you know if further analyses need to take the discrepancy into account.

For example, to see how many users fall into the segment you’re interested in, use the following query:

Redshift

From here, you can start to export facts you’re interested in about your users. For example, the user’s advertising_id.

Redshift

Example Result

Screen Shot 2015-11-05 at 4.39.25 PM


Upload Custom Audience Data to Facebook

To create a Facebook Custom Audience, you need more than 20 users in your segment.

With the data from your SQL query, you now have a CSV file to upload to Facebook to create your Custom Audience.

Screen Shot 2015-11-06 at 11.15.06 AM


Need a hosted solution?
Most Swrve customers can self-host this pipeline; all you have to do is follow the steps in these tutorials. However, if you prefer a turn-key hosted solution, we do offer one as a professional service. There is an additional fee associated with this service. For more information, contact your Customer Success Manager at support@swrve.com.

Need help with Queries?
Swrve support can help you with basic setup and configuration of the pipeline described above. If you need help with your queries, contact our Data Services team at support@swrve.com. They will help you get the most out of your data with dedicated support, pre-built and custom reports, and dedicated data science hours.