How to Download User Information from Localytics

Article author
Nicole Amero
  • Updated

 

What Kind of Info is Available?

When a user uses a sign in method to login to the app, VenueNext tags information about that user to create a "Profile" for that user in Localytics. The sign in or ticketing provider used in the app will affect the available data used to create a Profile. However, most apps will create a Profile using:

  • A customer ID _(required)_
  • The user's first and last name
  • The user's email

 

Note: A customer Profile will only be created after they have signed in.

 

How Can I Retrieve Info About These Users?

This article will walk through the necessary steps to retrieve a data export containing user emails using Localytics' Audience Exports feature. Retrieving the emails is only one example use case. For more information, refer to the Localytics documentation.

 

Prepare the Export

 

Create an audience

Before any information can be exported, an audience first needs to be created. In this example, an audience for user Profiles with a defined email will be created. To do this:

  1. Open the Localytics Dashboard of the desired app
  2. From the left side menu, select Audiences
  3. Select the + button in the top right corner to create a new audience
  4. At the top of the screen, select the pencil icon next to Untitled to change the audience name
  5. Change the name to the desired audience name
  6. Select the + Add Profile Conditions button toward the bottom center of the screen
  7. From the (choose attribute) dropdown that appears, select $email (org)
  8. From the next (choose one) dropdown that appears, select is defined
  9. The Profile condition statement should now read People where $email (org) is defined
  10. Select the Save button at the bottom left of the screen

 

Enable the Export

From the Audiences screen, find the newly created audience in the list.

  1. Select the actions button (•••) on the right side of the new audience list option
  2. In the Actions pop up modal, scroll down to the API section
  3. Select Enable Export
  4. From the dropdown of the pop up modal, select Email
  5. Select the Enable Export button

 

Gather the Required Data

Once the export is enabled, a few things need to be gathered before requesting the export:

  • The Localytics API key
  • The Localytics API secret
  • The audience ID

 

API Key and Secret

To find the API key and secret

1. Navigate to the API Keys tab of the Settings screen

2. Copy and save the API key and secret in the Localytics API Keys section for later

 

Audience ID

To find the audience ID:

  1. Select the actions button (•••) in the bottom left hand corner of the menu
  2. Navigate to Settings
  3. Click on the Data Exports tab
  4. Find the desired export and ensure it is enabled
  5. Copy and save the value from the Source ID column next to the Audience Name for the desired export for later

 

 

Request the Export

Request Command

Open a command line tool (Terminal on Mac or Windows Command Line on PC) on a desktop. Only one command is needed to gather the exports. Be sure to read through the Localytics documentation for examples outside of this example.

 

In a separate text editor, copy and paste this command:

curl -L https://API_KEY:API_SECRET@api.localytics.com/v1/exports/audiences/AUDIENCE_ID/email

 

Before pasting this command into the command line tool, the API_KEY, API_SECRET, and AUDIENCE_ID placeholders will need to be replaced with values gathered from previous steps:

  • Replace the API_KEY value with the API Key saved earlier
  • Replace the API_SECRET value with the API Secret saved earlier
  • Replace the AUDIENCE_ID value with the Audience ID saved earlier

 

The command should now look something like, but with the values saved for the specific export:

curl -L https://555555555-5555555-55555-555-55-555555:5555555555555@api.localytics.com/v1/exports/audiences/555555/email

 

Press the return key to run the command.

 

Note: The exports are created daily. This means for the first 24 hours, there will likely be no data to find. In this case, the response will be something like {"error":"ExportNotFound","error_description":"The requested export could not be found."}

 

Find the Export Data

After running the request command, you will receive a response that will be displayed in the command line tool. After running the request command, you will see a list of emails for users that have downloaded and signed in to the app:

{"EMAIL":"sampleUser@example.com"}

{"EMAIL":"sampleUser2@example.com"}

{"EMAIL":"sampleUse3r@example.com"}

{"EMAIL":"sampleUser4@example.com"}

{"EMAIL":"sampleUser5@example.com"}

{"EMAIL":"sampleUser6@example.com"}

{"EMAIL":"sampleUser7@example.com"}

{"EMAIL":"sampleUser8@example.com"}

{"EMAIL":"sampleUser9@example.com"}

{"EMAIL":"sampleUser10@example.com"}

 

Alternatively, for larger data sets, you will receive a response that  will look something like:

HTTP/1.1 302 Found

Date: Wed, 30 Nov 2016 14:47:38 GMT

Content-Length: 0

Connection: keep-alive

Location: https://auditorium-cache-prodprimary.s3.amazonaws.com/queries/fae3e6102993ef78d079ca16688ecdea35d5dfe2273986c1fafb500ea3ab012e-v1/c14ffba3-bfe2-4e5c-a16b-cd1f6850c5dd?AWSAccessKeyId=AKIAIT2WF7LISGBN23SQ&Expires=1480689996&Signature=0e6QA2ec8wEf%2FxAo6iYM47RinYk%3D

 

In this case, open the `Location` url to download the export.

Compare Emails to Ticketmaster Database

Now that you have the customer emails, you will be able to compare the user information to your Archtics database.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.