Skip to Content

Snapchat Ads Connection Details

Introduction

Connector Version

This documentation is based on version 25.0.9368 of the connector.

Get Started

Snapchat Ads Version Support

The connector leverages the Snapchat Ads API to enable bidirectional access to Snapchat Ads.

Establish a Connection

Connect to Snapchat Ads

Snapchat Ads supports OAuth authentication only. To enable this authentication from all OAuth flows, you must set AuthScheme to OAuth, and you must create a custom OAuth application.

To simplify routine queries, you can also set AccountId to provide a default AccountId. This eliminates the need to provide it manually as part of the WHERE clause. (If the AccountId is not specified and no account ID is explicitly supplied in the WHERE clause, the connector looks for the first account from the list returned by the Accounts view.)

The following subsections describe how to authenticate to Snapchat Ads from three common authentication flows:

  • Desktop: a connection to a server on the user's local machine, frequently used for testing and prototyping.
  • Web: access to data via a shared website.
  • Headless Server: a dedicated computer that provides services to other computers and their users, which is configured to operate without a monitor and keyboard.

For information about how to create a custom OAuth application, see Creating a Custom OAuth Application.

For a complete list of connection string properties available in Snapchat Ads, see Connection.

Desktop Applications

To authenticate with the credentials for a custom OAuth application, you must get and refresh the OAuth access token. After you do that, you are ready to connect.

Get and refresh the OAuth access token:

When you connect, the connector opens Snapchat Ads's OAuth endpoint in your default browser. Log in and grant permissions to the application.

After you grant permissions to the application, the connector then completes the OAuth process:

  1. The connector obtains an access token from Snapchat Ads and uses it to request data.
  2. The OAuth values are saved in the path specified in OAuthSettingsLocation. These values persist across connections.

When the access token expires, the connector refreshes it automatically.

Automatic refresh of the OAuth access token:

To have the connector automatically refresh the OAuth access token, do the following:

  1. Before connecting to data for the first time, set the following connection parameters:
  2. On subsequent data connections, set the following:

Manual refresh of the OAuth access token:

The only value needed to manually refresh the OAuth access token is the OAuth refresh token.

  1. To manually refresh the OAuthAccessToken after the ExpiresIn period (returned by GetOAuthAccessToken) has elapsed, call the RefreshOAuthAccessToken stored procedure.
  2. Set the following connection properties:
  3. Call RefreshOAuthAccessToken with OAuthRefreshToken set to the OAuth refresh token returned by GetOAuthAccessToken.
  4. After the new tokens have been retrieved, set the OAuthAccessToken property to the value returned by RefreshOAuthAccessToken. This opens a new connection.

Store the OAuth refresh token so that you can use it to manually refresh the OAuth access token after it has expired.

OAuth Scopes and Endpoints

Required Scopes for Snapchat Ads

When integrating with Snapchat Ads, your application needs specific permissions to interact with the API.

These permissions are defined by access scopes, which determine what data your application can access and what actions it can perform.

This topic provides information about the required access scopes and endpoint domains for the Snapchat Ads connector.

Understand Scopes

Scopes are a way to limit an application's access to a user's data. They define the specific actions that an application can perform on behalf of the user.

For example, a read-only scope might allow an application to view data, while a full access scope might allow it to modify data.

Required Scopes for Snapchat Ads
Scope Description
System List views and columns. Required for read access.
Tenant Non-Configurable Access and execute reports as a service.
Snapchat Ads Owned Scope Include items or components owned and managed by Snapchat Ads. Required for read access.

Create a Custom OAuth Application

Create a Custom OAuth Application

Creating a custom OAuth application changes the information displayed when users log into the Snapchat Ads OAuth endpoint to grant permissions to the connector.

The following subsections describe how to create a custom OAuth application in specific OAuth authentication flows, and notes which connection properties are returned in each case.

Desktop

To obtain the OAuthClientId, OAuthClientSecret, and CallbackURL connection properties:

  1. Login to your Snapchat Ads account.
  2. Navigate to Business Settings -> BusinessDetails -> OAuth Apps.
  3. Click Create an application and fill in your application details.

After the application has been created, you can retrieve the OAuthClientId and OAuthClientSecret.

Important Notes

Configuration Files and Their Paths

  • All references to adding configuration files and their paths refer to files and locations on the Jitterbit agent where the connector is installed. These paths are to be adjusted as appropriate depending on the agent and the operating system. If multiple agents are used in an agent group, identical files will be required on each agent.

Advanced Features

This section details a selection of advanced features of the Snapchat Ads connector.

User Defined Views

The connector supports the use of user defined views, virtual tables whose contents are decided by a pre-configured user defined query. These views are useful when you cannot directly control queries being issued to the drivers. For an overview of creating and configuring custom views, see User Defined Views.

SSL Configuration

Use SSL Configuration to adjust how connector handles TLS/SSL certificate negotiations. You can choose from various certificate formats. For further information, see the SSLServerCert property under "Connection String Options".

Proxy

To configure the connector using private agent proxy settings, select the Use Proxy Settings checkbox on the connection configuration screen.

Query Processing

The connector offloads as much of the SELECT statement processing as possible to Snapchat Ads and then processes the rest of the query in memory (client-side).

For further information, see Query Processing.

Log

For an overview of configuration settings that can be used to refine logging, see Logging. Only two connection properties are required for basic logging, but there are numerous features that support more refined logging, which enables you to use the LogModules connection property to specify subsets of information to be logged.

User Defined Views

The Snapchat Ads connector supports the use of user defined views: user-defined virtual tables whose contents are decided by a preconfigured query. User defined views are useful in situations where you cannot directly control the query being issued to the driver; for example, when using the driver from Jitterbit.

Use a user defined view to define predicates that are always applied. If you specify additional predicates in the query to the view, they are combined with the query already defined as part of the view.

There are two ways to create user defined views:

  • Create a JSON-formatted configuration file defining the views you want.
  • DDL statements.

Define Views Using a Configuration File

User defined views are defined in a JSON-formatted configuration file called UserDefinedViews.json. The connector automatically detects the views specified in this file.

You can also have multiple view definitions and control them using the UserDefinedViews connection property. When you use this property, only the specified views are seen by the connector.

This user defined view configuration file is formatted so that each root element defines the name of a view, and includes a child element, called query, which contains the custom SQL query for the view.

For example:

{
    "MyView": {
        "query": "SELECT * FROM Campaigns WHERE MyColumn = 'value'"
    },
    "MyView2": {
        "query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)"
    }
}

Use the UserDefinedViews connection property to specify the location of your JSON configuration file. For example:

"UserDefinedViews", "C:\Users\yourusername\Desktop\tmp\UserDefinedViews.json"

Define Views Using DDL Statements

The connector is also capable of creating and altering the schema via DDL Statements such as CREATE LOCAL VIEW, ALTER LOCAL VIEW, and DROP LOCAL VIEW.

Create a View

To create a new view using DDL statements, provide the view name and query as follows:

CREATE LOCAL VIEW [MyViewName] AS SELECT * FROM Customers LIMIT 20;

If no JSON file exists, the above code creates one. The view is then created in the JSON configuration file and is now discoverable. The JSON file location is specified by the UserDefinedViews connection property.

Alter a View

To alter an existing view, provide the name of an existing view alongside the new query you would like to use instead:

ALTER LOCAL VIEW [MyViewName] AS SELECT * FROM Customers WHERE TimeModified > '3/1/2020';

The view is then updated in the JSON configuration file.

Drop a View

To drop an existing view, provide the name of an existing schema alongside the new query you would like to use instead.

DROP LOCAL VIEW [MyViewName]

This removes the view from the JSON configuration file. It can no longer be queried.

Schema for User Defined Views

In order to avoid a view's name clashing with an actual entity in the data model, user defined views are exposed in the UserViews schema by default. To change the name of the schema used for UserViews, reset the UserViewsSchemaName property.

Work with User Defined Views

For example, a SQL statement with a user defined view called UserViews.RCustomers only lists customers in Raleigh:

SELECT * FROM Customers WHERE City = 'Raleigh';

An example of a query to the driver:

SELECT * FROM UserViews.RCustomers WHERE Status = 'Active';

Resulting in the effective query to the source:

SELECT * FROM Customers WHERE City = 'Raleigh' AND Status = 'Active';

That is a very simple example of a query to a user defined view that is effectively a combination of the view query and the view definition. It is possible to compose these queries in much more complex patterns. All SQL operations are allowed in both queries and are combined when appropriate.

SSL Configuration

Customize the SSL Configuration

By default, the connector attempts to negotiate TLS with the server. The server certificate is validated against the default system trusted certificate store. You can override how the certificate gets validated using the SSLServerCert connection property.

To specify another certificate, see the SSLServerCert connection property.

Data Model

Overview

This section shows the available API objects and provides more information on executing SQL to Snapchat Ads APIs.

Key Features

  • The connector models Snapchat Ads entities like documents, folders, and groups as relational views, allowing you to write SQL to query Snapchat Ads data.
  • Stored procedures allow you to execute operations to Snapchat Ads.
  • Live connectivity to these objects means any changes to your Snapchat Ads account are immediately reflected when using the connector.

Views

Views describes the available views. Views are statically defined to model Categories, OrderLineItems, and more.

Tables

Tables describes the available tables. Tables are statically defined to model Customers, Orders, Refunds.

Stored Procedures

Stored Procedures are function-like interfaces to Snapchat Ads. Stored procedures allow you to execute operations to Snapchat Ads, including calculating sales tax and validating addresses.

Tables

The connector models the data in Snapchat Ads as a list of tables in a relational database that can be queried using standard SQL statements.

Snapchat Ads Connector Tables

Name Description
Accounts Lists all the ad accounts for the specified Organization.
AudienceSegments Lists all Snap Audience Match segments within a specified ad account.
BillingCenters Lists all the billing centers for the specified Organization.
Campaigns Lists all campaigns within a specified ad account.
Members Lists all members for a specific organization.

Accounts

Lists all the ad accounts for the specified Organization.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =,IN
  • OrganizationId supports the following operators: =,IN; If no value is specified, the connector will try to get the first organization from the list returned by the Organizations view.

The following queries are processed server side:

SELECT * FROM Accounts WHERE OrganizationId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM Accounts WHERE OrganizationId IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '331deb8082b8-a1d5-4579-9f7c-2e874d37')
SELECT * FROM Accounts WHERE OrganizationId IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '331deb8082b8-a1d5-4579-9f7c-2e874d37')
SELECT * FROM Accounts WHERE Id = '5f433224-28d2-40f8-982b-c353c67934cb'
SELECT * FROM Accounts WHERE ID IN ('5f433224-28d2-40f8-982b-c353c67934cb', 'c353c67934cb-28d2-40f8-982b-c353c67934cb')
Insert
INSERT INTO Accounts (Name, Type, OrganizationId, Currency, TimeZone, BillingType, BillingCenterId, RestrictedDeliverySignalsRegulation, AgencyRepresentingClient, ClientPayingInvoices, Test, FundingSourceIds, ClientBasedInCountry, AgencyClientName, AgencyClientEmail, AgencyClientAddressLine1, AgencyClientCity, AgencyClientAdministrativeDistrictLevel1, AgencyClientCountry, AgencyClientZipCode, AgencyClientTaxId) VALUES ('delicieux aliments pour chiens', 'PARTNER', 'ca67fb1a-2653-495d-9446-c9e8a30f6232', 'EUR', 'Europe/Paris', 'REVOLVING', '6e0f4532-3702-4f0b-9889-9fe5d0614afd', false, true, false, true, '["5ca1687a-f2b4-437d-8554-a85403a714c5"]', 'FR', 'Madamemoiselle Poodle', 'poodle_client@example.com', '101 Boulevard la Fayette', 'Paris', 'FR-O', 'FR', '62100', 'FR12345678900')
Update
UPDATE Accounts SET Name = 'Updated name', AgencyClientName = 'Updated agency client name' WHERE ID = '5f433224-28d2-40f8-982b-c353c67934cb'
Columns
Name Type ReadOnly References Description
Id [KEY] String True ID of the AD account.
OrganizationId String False Organizations.Id The ID of the organization.
Advertiser String False Name of the Advertiser.
Currency String False Account currency. The allowed values are AUD, CAD, EUR, GBP, USD.
FundingSourceIds String False Array of Funding Source IDs.
BillingType String False Type of billing. The allowed values are IO, REVOLVING.
BillingCenterId String False BillingCenters.Id The billing center ID.
Name String False Account name.
Test Bool False Indicates Ad Account is a test ad account, test ad accounts can never serve live ads.
CreatedAt Datetime False The creation date of the entity.
UpdatedAt Datetime False The date when the entity was last updated.
Timezone String False Account timezone, remember to take the time differences into account when you set up your application. The allowed values are Africa/Cairo, Africa/Johannesburg, America/Anchorage, America/Cancun, America/Chicago, America/Dawson, America/Dawson_Creek, America/Denver, America/Edmonton, America/Halifax, America/Hermosillo, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Montevideo, America/New_York, America/Phoenix, America/Rainy_River, America/Regina, America/Tijuana, America/Toronto, America/Vancouver, Asia/Amman, Asia/Beirut, Asia/Dubai, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jerusalem, Asia/Kamchatka, Asia/Krasnoyarsk, Asia/Magadan, Asia/Nicosia, Asia/Omsk, Asia/Qatar, Asia/Riyadh, Asia/Shanghai, Asia/Singapore, Asia/Vladivostok, Asia/Yakutsk, Asia/Yekaterinburg, Atlantic/Canary, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Berlin, Europe/Brussels, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/London, Europe/Luxembourg, Europe/Madrid, Europe/Malta, Europe/Moscow, Europe/Oslo, Europe/Paris, Europe/Rome, Europe/Samara, Europe/Stockholm, Europe/Vienna, Europe/Vilnius, Europe/Warsaw, Europe/Zurich, Pacific/Auckland, Pacific/Honolulu, UTC.
Type String False Account type. The allowed values are DIRECT, PARTNER.
Status String False Account status.
LifetimeSpendCap Decimal False Required if BillingType is set to IO, the lifetime spend cap of the account.
AdvertiserOrganizationId String True Organizations.Id Organization ID of the Advertiser selected.
PayingAdvertiserName String False Name of the paying advertiser/political entity, required if the Ad Account will contain political/advocacy ads.
RestrictedDeliverySignalsRegulation String False Required if the Ad Account will contain ads for Credit, Housing or Employment, this attribute is immutable once set to true.
AgencyRepresentingClient Bool False Whether the agency is representing a client or not.
ClientBasedInCountry String False Required if AgencyRepresentingClient is true and if Advertiser is based in France or targeting Ads to audiences in France. The allowed values are FR.
ClientPayingInvoices Bool False Required if AgencyRepresentingClient is true and if Advertiser is based in France or targeting Ads to audiences in France.
DeliveryStatus String True Delivery status.
AgencyClientName String False Client metadata is required if AgencyRepresentingClient is true and if the Advertiser is based in France or is targeting Ads to audiences in France.
AgencyClientEmail String False Client metadata is required if AgencyRepresentingClient is true and if the Advertiser is based in France or is targeting Ads to audiences in France.
AgencyClientAddressLine1 String False Client metadata is required if AgencyRepresentingClient is true and if the Advertiser is based in France or is targeting Ads to audiences in France.
AgencyClientCity String False Client metadata is required if AgencyRepresentingClient is true and if the Advertiser is based in France or is targeting Ads to audiences in France.
AgencyClientAdministrativeDistrictLevel1 String False Client metadata is required if AgencyRepresentingClient is true and if the Advertiser is based in France or is targeting Ads to audiences in France.
AgencyClientCountry String False Client metadata is required if AgencyRepresentingClient is true and if the Advertiser is based in France or is targeting Ads to audiences in France.
AgencyClientZipCode String False Client metadata is required if AgencyRepresentingClient is true and if the Advertiser is based in France or is targeting Ads to audiences in France.
AgencyClientTaxId String False Client metadata is required if AgencyRepresentingClient is true and if the Advertiser is based in France or is targeting Ads to audiences in France.

AudienceSegments

Lists all Snap Audience Match segments within a specified ad account.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =,IN
  • AccountId supports the following operators: =,IN; If specified, it will override the value of the AccountId connection property. Otherwise, if no value is specified, the connector will try to get the first account from the list returned by the Accounts view.

The following queries are processed server side:

SELECT * FROM AudienceSegments WHERE AccountId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM AudienceSegments WHERE AccountId IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '331deb8082b8-a1d5-4579-9f7c-2e874d37')
SELECT * FROM AudienceSegments WHERE Id = '69b96ded-4871-4750-83ba-8f19507f6bdd'
SELECT * FROM AudienceSegments WHERE ID IN ('69b96ded-4871-4750-83ba-8f19507f6bdd', '8f19507f6bdd-69b96ded-4871-4750-83ba')
Insert
INSERT INTO AudienceSegments (Name, Description, SourceType, RetentionInDays, AccountId) VALUES ('all the sams in the world', 'all the sams in the world', 'FIRST_PARTY', 180, '422588db-75f3-47d1-be3b-92e296d33f68')
Update
UPDATE AudienceSegments SET Name = 'Updated name', Description = 'Updated description', RetentionInDays = 60 WHERE ID = '5689640350646272'
Delete
DELETE AudienceSegments WHERE ID = '4873877536079576'
Columns
Name Type ReadOnly References Description
Id [KEY] String True ID of the audience segment.
AccountId String False Accounts.Id Ad Account ID.
Description String False Audience Segment Description.
Name String False Audience Segment name.
CreatedAt Datetime False The creation date of the entity.
UpdatedAt Datetime False The date when the entity was last updated.
RetentionInDays Int False Number of days to retain audience members. The default value is 9999.
SourceType String False Data source type. The allowed values are FIRST_PARTY, ENGAGEMENT, PIXEL, MOBILE, FOOT_TRAFFIC_INSIGHTS.
ApproximateNumberUsers Int True Approximate number of users in the segment.
Status String True Status of the segment.
UploadStatus String True Upload status of the segment. The allowed values are NO_UPLOAD, PROCESSING, COMPLETE.
TargetableStatus String True Status of whether this segment can be targeted. The allowed values are NOT_READY, TOO_FEW_USERS, READY.

BillingCenters

Lists all the billing centers for the specified Organization.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =,IN
  • OrganizationId supports the following operators: =,IN; If no value is specified, the connector will try to get the first organization from the list returned by the Organizations view.

The following queries are processed server side:

SELECT * FROM BillingCenters WHERE OrganizationId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM BillingCenters WHERE OrganizationId IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '331deb8082b8-a1d5-4579-9f7c-2e874d37')
SELECT * FROM BillingCenters WHERE Id = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM BillingCenters WHERE ID IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '9f7c-a1d5-4579-9f7c-331deb8082b8')
Insert
INSERT INTO BillingCenters (OrganizationId, Name, EmailAddress, AddressLine1, Locality, AdministrativeDistrictLevel1, Country, PostalCode, AlternativeEmailAddresses) VALUES ('ca67fb1a-2653-495d-9446-c9e8a30f6232', 'Kianjous Billing Center', 'honeybear_ltd@example.com', '10 Honey Bear Road', 'London', 'GB-LND', 'GB', 'NW1 4RY', '["honeybear_burrow@example.com"]')
Update
UPDATE BillingCenters SET Name = 'Updated Billing Center Name' WHERE ID = '19247038-c858-4802-b786-40c162228e18'
Columns
Name Type ReadOnly References Description
Id [KEY] String True ID of the billing center.
OrganizationId String False Organizations.Id The ID of the organization.
Name String False Name of the Billing Center.
CreatedAt Datetime False The creation date of the entity.
UpdatedAt Datetime False The date when the entity was last updated.
EmailAddress String False Email address.
AddressLine1 String False Address line 1.
Locality String False Locality.
AdministrativeDistrictLevel1 String False District.
Country String False Country.
PostalCode String False Post code.
AlternativeEmailAddresses String False Array of email addresses.

Campaigns

Lists all campaigns within a specified ad account.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =,IN
  • AccountId supports the following operators: =,IN; If specified, it will override the value of the AccountId connection property. Otherwise, if no value is specified, the connector will try to get the first account from the list returned by the Accounts view.

The following queries are processed server side:

SELECT * FROM Campaigns WHERE AccountId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM Campaigns WHERE AccountId IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '331deb8082b8-a1d5-4579-9f7c-2e874d37')
SELECT * FROM Campaigns WHERE Id = '5f433224-28d2-40f8-982b-c353c67934cb'
SELECT * FROM Campaigns WHERE ID IN ('5f433224-28d2-40f8-982b-c353c67934cb', 'c353c67934cb-5f433224-28d2-40f8-982b')
Insert
INSERT INTO Campaigns (Name, AccountId, Status, StartTime, RegulationsRestrictedDeliverySignals, MeasurementSpecIOSAppId, MeasurementSpecAndroidAppURL) VALUES ('Cool Campaign', '422588db-75f3-47d1-be3b-92e296d33f68', 'PAUSED', '2016-08-11 22:03:58.869', true, '1234', 'com.snapchatads.android')
Update
UPDATE Campaigns SET Name = 'Cool Campaign (Updated)', RegulationsRestrictedDeliverySignals = false WHERE ID = '1ebd8b15-8100-4cbb-8ad1-04b538bbd043'
Delete
DELETE Campaigns WHERE ID = '1ebd8b15-8100-4cbb-8ad1-04b538bbd043'
Columns
Name Type ReadOnly References Description
Id [KEY] String True Campaign ID.
AccountId String False Accounts.Id Ad Account ID.
DailyBudget Decimal False Daily Spend Cap.
EndTime Datetime False End time.
Name String False Campaign name.
CreatedAt Datetime False The creation date of the entity.
UpdatedAt Datetime False The date when the entity was last updated.
StartTime Datetime False Start time.
Status String False Campaign status. The allowed values are ACTIVE, PAUSED.
LifetimeSpendCap Decimal False Lifetime spend cap for the campaign.
MeasurementSpecIOSAppId String False The IOS app to be tracked for this campaign.
MeasurementSpecAndroidAppURL String False The Android app to be tracked for this campaign.
Objective String False [DEPRECATED] Objective of the Campaign. The field is deprecated. Use ObjectiveType and PromotionType for creating records instead. The default value is BRAND_AWARENESS.
ObjectiveType String False Objective type of the Campaign. The default value is AWARENESS_AND_ENGAGEMENT.
PromotionType String False Promotion type of the Campaign.
RegulationsRestrictedDeliverySignals Bool False Required for Campaigns that run Ads for Credit, Housing, Employment (CHE).
RegulationsCandidateBallotInformation String False The candidate / ballot field is optional, but may be required in certain states.
DeliveryStatus String True Delivery status.

Members

Lists all members for a specific organization.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =,IN
  • OrganizationId supports the following operators: =,IN; If no value is specified, the connector will try to get the first organization from the list returned by the Organizations view.

The following queries are processed server side:

SELECT * FROM Members WHERE OrganizationId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM Members WHERE OrganizationId IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '331deb8082b8-a1d5-4579-9f7c-2e874d37')
SELECT * FROM Members WHERE Id = '69b96ded-4871-4750-83ba-8f19507f6bdd'
SELECT * FROM Members WHERE ID IN ('69b96ded-4871-4750-83ba-8f19507f6bdd', '8f19507f6bdd-69b96ded-4871-4750-83ba')
Insert
INSERT INTO Members (OrganizationId, Email, DisplayName) VALUES ('ca67fb1a-2653-495d-9446-c9e8a30f6232', 'test@example.com', 'Member 0')
Update
UPDATE Members SET DisplayName = 'Member 0 (Updated Name)' WHERE ID = '6a0f3939-cd2b-4e35-b539-a9a68ce579e7'
Delete
DELETE Members WHERE ID = '6a0f3939-cd2b-4e35-b539-a9a68ce579e7'
Columns
Name Type ReadOnly References Description
Id [KEY] String False Member Id.
OrganizationId String False Organizations.Id The ID of the organization.
DisplayName String False Name of the user.
CreatedAt Datetime False The creation date of the entity.
UpdatedAt Datetime False The date when the entity was last updated.
MemberStatus String False Name of the Advertiser. The allowed values are INVITED, MEMBER.
Email String False Email address of the user.

Views

Views are similar to tables in the way that data is represented; however, views are read-only.

Queries can be executed against a view as if it were a normal table.

Snapchat Ads Connector Views

Name Description
AccountStats Lists the spend metric for the specified Ad Account.
Ads Lists all ads within a specified ad account.
AdSquads Lists all ad squads within a specified ad account.
AdSquadStats Lists all ad squad stats.
AdStats Lists all ad stats.
AdvancedDemographics Lists all Advanced Demographics targeting options.
AudienceInsights Lists all audience insights based on the targeting options.
CampaignStats Lists all campaign stats.
Creatives Retrieves all creatives associated with an ad account
DemographicsAgeGroups Lists all age group targeting options.
DemographicsGender Lists all gender targeting options.
DemographicsLanguages Lists all language targeting options.
DeviceCarriers Lists all device carrier targeting options.
DeviceConnectionTypes Lists all device connection type targeting options.
DeviceMakes Lists all device make targeting options.
DeviceOSTypes Lists all device OS type targeting options.
DeviceOSVersions Lists all device OS version targeting options.
FundingSources Lists all funding sources for the specified Organization.
GeolocationCountries Lists all country targeting options.
GeolocationMetros Lists all metro/dma targeting options.
GeolocationRegions Lists all region/state targeting options.
GeolocationZipCodes Lists all of zipcode targeting options.
Invoices Lists all invoices for a given Ad Account.
LocationCategories Lists all location categories.
NielsenInterests Lists all Nielsen Interests targeting options.
Organizations Lists all the organizations where the authenticated user has access.
PlacedVisitationSegmentsInterests Lists all interest targeting based on Placed Visitation Segments.
SnapLifeStyleCategoriesInterests Lists all Snap Lifestyle Categories targeting options.

AccountStats

Lists the spend metric for the specified Ad Account.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • AccountId supports the following operators: =,IN; If specified, it will override the value of the AccountId connection property. Otherwise, if no value is specified, the connector will try to get the first account from the list returned by the Accounts view.
  • StartTime supports the following operator: =
  • EndTime supports the following operator: =
  • Granularity supports the following operator: =

The following queries are processed server side:

SELECT * FROM AccountStats WHERE StartTime = '01/02/2019' AND EndTime = '10/14/2020'
SELECT * FROM AccountStats WHERE Granularity = 'LIFETIME' AND AccountId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57'

Note

If a time window is not specified, the stats for the last seven days or the last 31 days will be returned based on the specified granularity.

Columns
Name Type References Description
AccountId String The ID of the entity to query.
StartTime Datetime Scopes the retrieved data to data collected in the window of time between StartTime and EndTime. Must be expressed in whole hours.
EndTime Datetime Scopes the retrieved data to data collected in the window of time between StartTime and EndTime. Must be expressed in whole hours.
FinalizedDataEndTime Datetime This defines the time up until when reporting metrics are finalized. You can query for all metrics before this time including uniques and reach and they will have the final numbers. For any time after the FinalizedDataEndTime the metrics are still undergoing de-duplication and finalization and may change accordingly.
IntervalStartTime Datetime Start time of the current interval. This applies only to Granularity DAY and HOUR.
IntervalEndTime Datetime End time of the current interval. This applies only to Granularity DAY and HOUR.
Granularity String Determines how granular the data points will be returned within the time range specified by StartTime and EndTime. For instance, when set to HOUR, you will be presented with a datapoint for each hour between StartTime and EndTime. The allowed values are LIFETIME, TOTAL, DAY, HOUR. The default value is DAY.
Spend Decimal Amount Spent.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
RetrieveSampleStats Bool

Ads

Lists all ads within a specified ad account.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =,IN
  • AccountId supports the following operators: =,IN; If specified, it will override the value of the AccountId connection property. Otherwise, if no value is specified, the connector will try to get the first account from the list returned by the Accounts view.
  • AdSquadId supports the following operators: =,IN

The following queries are processed server side:

SELECT * FROM Ads WHERE AccountId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM Ads WHERE AccountId IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '331deb8082b8-a1d5-4579-9f7c-2e874d37')
SELECT * FROM Ads WHERE AdSquadId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM Ads WHERE AdSquadId IN ('2e8231d37-a1d5-4579-9f7c-331deb8082b8', 'ads2345-a1d5-4579-9f7c-2e874d37')
SELECT * FROM Ads WHERE Id = '69b96ded-4871-4750-83ba-8f19507f6bdd'
SELECT * FROM Ads WHERE ID IN ('69b96ded-4871-4750-83ba-8f19507f6bdd', '83ba-8f19507f6bdd-69b96ded-4871-4750')
Columns
Name Type References Description
Id [KEY] String ID of the ad.
AccountId String Accounts.Id Ad Account ID.
AdSquadId String AdSquads.Id Ad Squad ID.
CreativeId String Creative ID.
Name String Ad name.
CreatedAt Datetime The creation date of the entity.
UpdatedAt Datetime The date when the entity was last updated.
PayingAdvertiserName String Name of the paying advertiser/political entity.
ReviewStatus String Ad Review Status. The allowed values are PENDING, APPROVED, REJECTED.
ReviewStatusReason String List of Ad Review Rejection Reasons.
Status String Ad status. The allowed values are ACTIVE, PAUSED.
Type String Ad type. The allowed values are SNAP_AD, LONGFORM_VIDEO, APP_INSTALL, REMOTE_WEBPAGE, DEEP_LINK, STORY, AD_TO_LENS, AD_TO_CALL, AD_TO_MESSAGE, FILTER, LENS, LENS_WEB_VIEW, LENS_APP_INSTALL, LENS_DEEP_LINK, LENS_LONGFORM_VIDEO, COLLECTION.
DeliveryStatus String Delivery status.

AdSquads

Lists all ad squads within a specified ad account.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =,IN
  • AccountId supports the following operators: =,IN; If specified, it will override the value of the AccountId connection property. Otherwise, if no value is specified, the connector will try to get the first account from the list returned by the Accounts view.
  • CampaignId supports the following operators: =,IN

The following queries are processed server side:

SELECT * FROM AdSquads WHERE AccountId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM AdSquads WHERE AccountId IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '331deb8082b8-a1d5-4579-9f7c-2e874d37')
SELECT * FROM AdSquads WHERE CampaignId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM AdSquads WHERE CampaignId IN ('2e8231d37-a1d5-4579-9f7c-331deb8082b8', 'ads2345-a1d5-4579-9f7c-2e874d37')
SELECT * FROM AdSquads WHERE Id = '69b96ded-4871-4750-83ba-8f19507f6bdd'
SELECT * FROM AdSquads WHERE ID IN ('69b96ded-4871-4750-83ba-8f19507f6bdd', '8f19507f6bdd-69b96ded-4871-4750-83ba')
Columns
Name Type References Description
Id [KEY] String ID of the ad squad.
AccountId String Accounts.Id Ad account ID.
CampaignId String Campaigns.Id Campaign ID.
Bid Decimal Max Bid.
BillingEvent String Billing Event.
DailyBudget Decimal Daily Budget.
LifetimeBudget Decimal Lifetime budget.
EndTime Datetime End time.
Name String Ad Squad name.
CreatedAt Datetime The creation date of the entity.
UpdatedAt Datetime The date when the entity was last updated.
OptimizationGoal String Optimization Goal. The allowed values are IMPRESSIONS, SWIPES, APP_INSTALLS, VIDEO_VIEWS, VIDEO_VIEWS_15_SEC, USES, STORY_OPENS, PIXEL_PAGE_VIEW, PIXEL_ADD_TO_CART, PIXEL_PURCHASE, PIXEL_SIGNUP, APP_ADD_TO_CART, APP_PURCHASE, APP_SIGNUP.
ConversionWindow String Conversion window optimization, requires optimization_goal is one of APP_INSTALLS, APP_PURCHASE, APP_SIGNUP, APP_ADD_TO_CART, APP_REENGAGE_OPEN. The allowed values are SWIPE_28DAY_VIEW_1DAY, SWIPE_7D.
Placement String Placement.
StartTime Datetime Start time.
Status String Ad Squad status. The allowed values are ACTIVE, PAUSED.
Targeting String Targeting spec.
Type String Ad Squad Type. The allowed values are SNAP_ADS, LENS, FILTER.
CapAndExclusionConfig String The frequency cap and exclusion spec.
AdSchedulingConfig String The schedule for running ads.
BidStrategy String Bidding strategy for this Ad Squad. The allowed values are AUTO_BID, LOWEST_COST_WITH_MAX_BID, MIN_ROAS, TARGET_COST.
RoasValue Decimal The desired ROAS used with the MIN_ROAS BidStrategy.
PixelId String Pixel to be associated with the Ad Squad.
MeasurementProviderNames String approved measurement provider. The allowed values are MOAT_SS, DOUBLEVERIFY.
DeliveryConstraint String Type of delivery.
PacingType String Type of pacing. The allowed values are STANDARD, ACCELERATED. The default value is STANDARD.
DeliveryStatus String Delivery status.

AdSquadStats

Lists all ad squad stats.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • CampaignId supports the following operators: =,IN
  • AdSquadId supports the following operators: =,IN
  • StartTime supports the following operator: =
  • EndTime supports the following operator: =
  • Granularity supports the following operator: =
  • Dimension supports the following operator: =
  • SwipeUpAttributionWindow supports the following operator: =
  • ViewAttributionWindow supports the following operator: =
  • ConversionSourceTypes supports the following operator: =

The following queries are processed server side:

SELECT * FROM AdSquadStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57'
SELECT * FROM AdSquadStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND StartTime = '01/02/2019' AND EndTime = '10/14/2020'
SELECT * FROM AdSquadStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND Dimension = 'Country'
SELECT * FROM AdSquadStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND Granularity = 'LIFETIME'
SELECT * FROM AdSquadStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND SwipeUpAttributionWindow = '1_DAY' AND ViewAttributionWindow = '1_HOUR'
SELECT * FROM AdSquadStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND ConversionSourceTypes = 'app'
SELECT * FROM AdSquadStats WHERE AdSquadId = '8adc3db7-8148-4fbf-999c-8d2266369d74'
SELECT * FROM AdSquadStats WHERE AdSquadId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND StartTime = '01/02/2019' AND EndTime = '10/14/2020'
SELECT * FROM AdSquadStats WHERE AdSquadId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND Dimension = 'Country'
SELECT * FROM AdSquadStats WHERE AdSquadId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND Granularity = 'LIFETIME'
SELECT * FROM AdSquadStats WHERE AdSquadId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND SwipeUpAttributionWindow = '1_DAY' AND ViewAttributionWindow = '1_HOUR'
SELECT * FROM AdSquadStats WHERE AdSquadId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND ConversionSourceTypes = 'app'

Note

You must specify either CampaignId or AdSquadId. If a time window is not specified, the stats for the last seven days or the last 31 days will be returned based on the specified granularity.

If you do not specify a wildcard column and specify one of the dimensions from the table below in the SELECT projection the stats will breakdown according to the specified dimension.

You can not specify dimensions with different dimension categories. You can only query one dimension at a time unless you are querying (age and gender) or (InterestCategoryId and InterestCategoryName) which may be combined.

Dimension Dimension Category
Country geos
Region geos
DMA geos
Gender demographics
Age demographics
InterestCategoryId interests
InterestCategoryName interests
OS devices
Make devices
Columns
Name Type References Description
CampaignId String Campaigns.Id The campaign Id.
AdSquadId String AdSquads.Id The ad squad id.
StartTime Datetime Scopes the retrieved data to data collected in the window of time between StartTime and EndTime. Must be expressed in whole hours.
EndTime Datetime Scopes the retrieved data to data collected in the window of time between StartTime and EndTime. Must be expressed in whole hours.
FinalizedDataEndTime Datetime This defines the time up until when reporting metrics are finalized. You can query for all metrics before this time including uniques and reach and they will have the final numbers. For any time after the FinalizedDataEndTime the metrics are still undergoing de-duplication and finalization and may change accordingly.
IntervalStartTime Datetime Start time of the current interval. This applies only to Granularity DAY and HOUR.
IntervalEndTime Datetime End time of the current interval. This applies only to Granularity DAY and HOUR.
Granularity String Determines how granular the data points will be returned within the time range specified by StartTime and EndTime. For instance, when set to HOUR, you will be presented with a datapoint for each hour between StartTime and EndTime.
Dimension String You can get reporting insights based on different geographic, demographic, interest-based, and device-based dimensions. You can only query one dimension at a time unless you are querying age and gender which may be combined.
SwipeUpAttributionWindow String Attribution window for swipe ups.
ViewAttributionWindow String Attribution window for views.
Country String ISO country code.
Region String Region.
DMA Int DMA numeric code.
Gender String Gender.
Age String Age bucket.
InterestCategoryId String SnapchatAds User Lifestyle Interest Category Id.
InterestCategoryName String SnapchatAds User Lifestyle Interest Category Name.
OS String Device Operating System.
Make String Device Make (e.g., Apple, Samsung)
Impressions Int Impression Count.
Swipes Int Swipe-Up Count.
ViewTimeMillis Long Use screen_time_millis instead. Total Time Spent on top Snap Ad (milliseconds).
ScreenTimeMillis Long Total Time Spent on top Snap Ad (milliseconds).
Quartile1 Int Video Views to 25%.
Quartile2 Int Video Views to 50%.
Quartile3 Int Video Views to 75%.
ViewCompletion Int Video Views to completion.
Spend Decimal Amount Spent.
VideoViews Int The total number of impressions that meet the qualifying video view criteria of at least 2 seconds of consecutive watch time or a swipe up action on the Top Snap.
AndroidInstalls Int Number of Android App Installs.
AndroidInstallsApp Int Number of Android App Installs.
AndroidInstallsWeb Int Number of Android App Installs.
AndroidInstallsSwipeUp Int Number of Android App Installs.
AndroidInstallsAppSwipeUp Int Number of Android App Installs.
AndroidInstallsWebSwipeUp Int Number of Android App Installs.
AndroidInstallsView Int Number of Android App Installs.
AndroidInstallsAppView Int Number of Android App Installs.
AndroidInstallsWebView Int Number of Android App Installs.
AttachmentAvgViewTimeMillis Long Average Attachment View Time (milli-seconds).
AttachmentFrequency Double Average number of Attachment Views per User Reached.
AttachmentQuartile1 Int Long Form Video Views to 25%.
AttachmentQuartile2 Int Long Form Video Views to 50%.
AttachmentQuartile3 Int Long Form Video Views to 75%.
AttachmentTotalViewTimeMillis Long Total Attachment View Time (milli-seconds).
AttachmentUniques Int Number of unique attachment impressions.
AttachmentViewCompletion Int Long Form Video Views to completion.
AttachmentVideoViews Int Long Form Video Attachment Views, viewed for at least 10 consecutive seconds or reached 97% of the Long Form Video duration.
AvgViewTimeMillis Long Use avg_screen_time_millis instead. Average Top Snap view time per User Reached.
AvgScreenTimeMillis Long Average Top Snap view time across all impressions.
Frequency Double Average number of Impressions per User Reached.
IosInstalls Int Number of iOS App Installs.
IosInstallsApp Int Number of iOS App Installs.
IosInstallsWeb Int Number of iOS App Installs.
IosInstallsSwipeUp Int Number of iOS App Installs.
IosInstallsAppSwipeUp Int Number of iOS App Installs.
IosInstallsWebSwipeUp Int Number of iOS App Installs.
IosInstallsView Int Number of iOS App Installs.
IosInstallsAppView Int Number of iOS App Installs.
IosInstallsWebView Int Number of iOS App Installs.
SwipeUpPercent Double % of Impressions that Swiped-Up.
TotalInstalls Int Total number of App Installs.
TotalInstallsApp Int Total number of App Installs.
TotalInstallsWeb Int Total number of App Installs.
TotalInstallsSwipeUp Int Total number of App Installs.
TotalInstallsAppSwipeUp Int Total number of App Installs.
TotalInstallsWebSwipeUp Int Total number of App Installs.
TotalInstallsView Int Total number of App Installs.
TotalInstallsAppView Int Total number of App Installs.
TotalInstallsWebView Int Total number of App Installs.
Uniques Int Number of unique impressions.
VideoViewsTimeBased Int The total number of impressions that meet the qualifying video view criteria of at least 2 seconds, not including swipe ups.
VideoViews15s Int The total number of impressions that meet the qualifying video view criteria of at least 15 seconds, or 97% completion if it?s shorter than 15 seconds, or a swipe up action on the ad.
StoryOpens Int Number of times users tapped on the ad tile in the feed to view the Story Ad.
StoryCompletes Int Number of times users viewed through to the last Snap of your Story Ad.
PositionImpressions Int The impression number for this story ad position.
PositionUniques Int The unique viewer numbers for this story ad position.
PositionFrequency Double The frequency for this story ad position.
PositionScreenTimeMillis Long The total view time in milliseconds for this story ad position.
PositionSwipeUpPercent Double The swipe up rate for this story ad position.
AvgPositionScreenTimeMillis Long The average view time for this story ad position.
Shares Int Number of times lens/filter was shared in a Chat or Story.
Saves Int Number of times lens/filter was saved to Memories.
ConversionPurchases Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValue Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSave Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckout Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCart Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContent Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBilling Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUps Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearches Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletes Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpens Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViews Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribe Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClick Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorial Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInvite Int Number of attributed 'INVITE' conversion events.
ConversionLogin Int Number of attributed 'LOGIN' conversion events.
ConversionShare Int Number of attributed 'SHARE' conversion events.
ConversionReserve Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlocked Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlist Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCredits Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRate Int Number of attributed 'RATE' conversion events.
ConversionStartTrial Int Number of attributed 'START_TRIAL' conversion events.
ConversionListView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1 Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2 Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3 Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4 Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5 Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesSwipeUp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueSwipeUp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveSwipeUp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutSwipeUp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartSwipeUp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentSwipeUp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingSwipeUp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsSwipeUp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesSwipeUp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesSwipeUp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensSwipeUp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsSwipeUp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeSwipeUp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickSwipeUp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewSwipeUp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialSwipeUp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteSwipeUp Int Number of attributed 'INVITE' conversion events.
ConversionLoginSwipeUp Int Number of attributed 'LOGIN' conversion events.
ConversionShareSwipeUp Int Number of attributed 'SHARE' conversion events.
ConversionReserveSwipeUp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedSwipeUp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistSwipeUp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsSwipeUp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateSwipeUp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialSwipeUp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewSwipeUp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1SwipeUp Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2SwipeUp Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3SwipeUp Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4SwipeUp Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5SwipeUp Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesView Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueView Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveView Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutView Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartView Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentView Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingView Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsView Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesView Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesView Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensView Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsView Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeView Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickView Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialView Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteView Int Number of attributed 'INVITE' conversion events.
ConversionLoginView Int Number of attributed 'LOGIN' conversion events.
ConversionShareView Int Number of attributed 'SHARE' conversion events.
ConversionReserveView Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedView Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistView Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsView Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateView Int Number of attributed 'RATE' conversion events.
ConversionStartTrialView Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1View Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2View Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3View Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4View Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5View Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesApp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueApp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveApp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutApp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartApp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentApp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingApp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsApp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesApp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesApp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensApp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsApp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeApp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickApp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewApp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialApp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteApp Int Number of attributed 'INVITE' conversion events.
ConversionLoginApp Int Number of attributed 'LOGIN' conversion events.
ConversionShareApp Int Number of attributed 'SHARE' conversion events.
ConversionReserveApp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedApp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistApp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsApp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateApp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialApp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewApp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1App Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2App Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3App Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4App Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5App Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesAppSwipeUp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueAppSwipeUp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveAppSwipeUp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutAppSwipeUp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartAppSwipeUp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentAppSwipeUp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingAppSwipeUp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsAppSwipeUp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesAppSwipeUp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesAppSwipeUp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensAppSwipeUp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsAppSwipeUp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeAppSwipeUp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickAppSwipeUp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewAppSwipeUp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialAppSwipeUp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteAppSwipeUp Int Number of attributed 'INVITE' conversion events.
ConversionLoginAppSwipeUp Int Number of attributed 'LOGIN' conversion events.
ConversionShareAppSwipeUp Int Number of attributed 'SHARE' conversion events.
ConversionReserveAppSwipeUp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedAppSwipeUp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistAppSwipeUp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsAppSwipeUp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateAppSwipeUp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialAppSwipeUp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewAppSwipeUp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesAppView Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueAppView Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveAppView Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutAppView Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartAppView Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentAppView Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingAppView Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsAppView Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesAppView Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesAppView Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensAppView Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsAppView Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeAppView Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickAppView Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewAppView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialAppView Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteAppView Int Number of attributed 'INVITE' conversion events.
ConversionLoginAppView Int Number of attributed 'LOGIN' conversion events.
ConversionShareAppView Int Number of attributed 'SHARE' conversion events.
ConversionReserveAppView Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedAppView Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistAppView Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsAppView Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateAppView Int Number of attributed 'RATE' conversion events.
ConversionStartTrialAppView Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewAppView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1AppView Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2AppView Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3AppView Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4AppView Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5AppView Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesWeb Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueWeb Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveWeb Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutWeb Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartWeb Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentWeb Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingWeb Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsWeb Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesWeb Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesWeb Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensWeb Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsWeb Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeWeb Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickWeb Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewWeb Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialWeb Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteWeb Int Number of attributed 'INVITE' conversion events.
ConversionLoginWeb Int Number of attributed 'LOGIN' conversion events.
ConversionShareWeb Int Number of attributed 'SHARE' conversion events.
ConversionReserveWeb Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedWeb Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistWeb Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsWeb Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateWeb Int Number of attributed 'RATE' conversion events.
ConversionStartTrialWeb Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewWeb Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1Web Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2Web Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3Web Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4Web Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5Web Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesWebSwipeUp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueWebSwipeUp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveWebSwipeUp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutWebSwipeUp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartWebSwipeUp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentWebSwipeUp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingWebSwipeUp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsWebSwipeUp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesWebSwipeUp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesWebSwipeUp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensWebSwipeUp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsWebSwipeUp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeWebSwipeUp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickWebSwipeUp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewWebSwipeUp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialWebSwipeUp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteWebSwipeUp Int Number of attributed 'INVITE' conversion events.
ConversionLoginWebSwipeUp Int Number of attributed 'LOGIN' conversion events.
ConversionShareWebSwipeUp Int Number of attributed 'SHARE' conversion events.
ConversionReserveWebSwipeUp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedWebSwipeUp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistWebSwipeUp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsWebSwipeUp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateWebSwipeUp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialWebSwipeUp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewWebSwipeUp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesWebView Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueWebView Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveWebView Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutWebView Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartWebView Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentWebView Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingWebView Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsWebView Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesWebView Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesWebView Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensWebView Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsWebView Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeWebView Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickWebView Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewWebView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialWebView Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteWebView Int Number of attributed 'INVITE' conversion events.
ConversionLoginWebView Int Number of attributed 'LOGIN' conversion events.
ConversionShareWebView Int Number of attributed 'SHARE' conversion events.
ConversionReserveWebView Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedWebView Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistWebView Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsWebView Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateWebView Int Number of attributed 'RATE' conversion events.
ConversionStartTrialWebView Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewWebView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1WebView Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2WebView Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3WebView Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4WebView Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5WebView Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
ConversionSourceTypes String
RetrieveSampleStats Bool

AdStats

Lists all ad stats.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • CampaignId supports the following operators: =,IN
  • AdId supports the following operators: =,IN
  • AccountId supports the following operators: =,IN
  • StartTime supports the following operator: =
  • EndTime supports the following operator: =
  • Granularity supports the following operator: =
  • Dimension supports the following operator: =
  • SwipeUpAttributionWindow supports the following operator: =
  • ViewAttributionWindow supports the following operator: =
  • ConversionSourceTypes supports the following operator: =
  • BreakDownMetricsByPosition supports the following operator: =

The following queries are processed server side:

SELECT * FROM AdStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57'
SELECT * FROM AdStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND StartTime = '01/02/2019' AND EndTime = '10/14/2020'
SELECT * FROM AdStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND Dimension = 'Country'
SELECT * FROM AdStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND Granularity = 'LIFETIME'
SELECT * FROM AdStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND BreakDownMetricsByPosition = true
SELECT * FROM AdStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND SwipeUpAttributionWindow = '1_DAY' AND ViewAttributionWindow = '1_HOUR'
SELECT * FROM AdStats WHERE CampaignId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND ConversionSourceTypes = 'app'
SELECT * FROM AdStats WHERE AdId = '8adc3db7-8148-4fbf-999c-8d2266369d74'
SELECT * FROM AdStats WHERE AdId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND StartTime = '01/02/2019' AND EndTime = '10/14/2020'
SELECT * FROM AdStats WHERE AdId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND Dimension = 'Country'
SELECT * FROM AdStats WHERE AdId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND Granularity = 'LIFETIME'
SELECT * FROM AdStats WHERE AdId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND BreakDownMetricsByPosition = true
SELECT * FROM AdStats WHERE AdId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND SwipeUpAttributionWindow = '1_DAY' AND ViewAttributionWindow = '1_HOUR'
SELECT * FROM AdStats WHERE AdId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND ConversionSourceTypes = 'app'
SELECT * FROM AdStats WHERE AccountId IN ('68053bcd-675c-4dc7-a622-dc2ca218dcfe', '77553bcd-675c-4dc7-a622-dc2ca218dcag');

Note

You must specify either CampaignId, AdId or AccountId. When the AccountId filter is applied, the driver first retrieves the CampaignIds linked to that AccountId. It then retrieves and displays the statistics for each CampaignId. If a time window is not specified, the stats for the last seven days or the last 31 days are returned based on the specified granularity.

If you do not specify a wildcard column and specify one of the dimensions from the table below in the SELECT projection the stats will breakdown according to the specified dimension.

You can not specify dimensions with different dimension categories. You can only query one dimension at a time unless you are querying (age and gender) or (InterestCategoryId and InterestCategoryName) which may be combined.

Dimension Dimension Category
Country geos
Region geos
DMA geos
Gender demographics
Age demographics
InterestCategoryId interests
InterestCategoryName interests
OS devices
Make devices
Columns
Name Type References Description
CampaignId String Campaigns.Id The campaign Id.
AdId String Ads.Id The ad id.
AccountId String Accounts.Id The account id.
PlatformPosition String The platform position.
StartTime Datetime Scopes the retrieved data to data collected in the window of time between StartTime and EndTime. Must be expressed in whole hours.
EndTime Datetime Scopes the retrieved data to data collected in the window of time between StartTime and EndTime. Must be expressed in whole hours.
FinalizedDataEndTime Datetime This defines the time up until when reporting metrics are finalized. You can query for all metrics before this time including uniques and reach and they will have the final numbers. For any time after the FinalizedDataEndTime the metrics are still undergoing de-duplication and finalization and may change accordingly.
IntervalStartTime Datetime Start time of the current interval. This applies only to Granularity DAY and HOUR.
IntervalEndTime Datetime End time of the current interval. This applies only to Granularity DAY and HOUR.
Granularity String Determines how granular the data points will be returned within the time range specified by StartTime and EndTime. For instance, when set to HOUR, you will be presented with a datapoint for each hour between StartTime and EndTime.
Dimension String You can get reporting insights based on different geographic, demographic, interest-based, and device-based dimensions. You can only query one dimension at a time unless you are querying age and gender which may be combined.
SwipeUpAttributionWindow String Attribution window for swipe ups.
ViewAttributionWindow String Attribution window for views.
Country String ISO country code.
Region String Region.
DMA Int DMA numeric code.
Gender String Gender.
Age String Age bucket.
InterestCategoryId String SnapchatAds User Lifestyle Interest Category Id.
InterestCategoryName String SnapchatAds User Lifestyle Interest Category Name.
OS String Device Operating System.
Make String Device Make (e.g., Apple, Samsung)
Impressions Int Impression Count.
Swipes Int Swipe-Up Count.
ViewTimeMillis Long Use screen_time_millis instead. Total Time Spent on top Snap Ad (milliseconds).
ScreenTimeMillis Long Total Time Spent on top Snap Ad (milliseconds).
Quartile1 Int Video Views to 25%.
Quartile2 Int Video Views to 50%.
Quartile3 Int Video Views to 75%.
ViewCompletion Int Video Views to completion.
Spend Decimal Amount Spent.
VideoViews Int The total number of impressions that meet the qualifying video view criteria of at least 2 seconds of consecutive watch time or a swipe up action on the Top Snap.
AndroidInstalls Int Number of Android App Installs.
AndroidInstallsApp Int Number of Android App Installs.
AndroidInstallsWeb Int Number of Android App Installs.
AndroidInstallsSwipeUp Int Number of Android App Installs.
AndroidInstallsAppSwipeUp Int Number of Android App Installs.
AndroidInstallsWebSwipeUp Int Number of Android App Installs.
AndroidInstallsView Int Number of Android App Installs.
AndroidInstallsAppView Int Number of Android App Installs.
AndroidInstallsWebView Int Number of Android App Installs.
AttachmentAvgViewTimeMillis Long Average Attachment View Time (milli-seconds).
AttachmentFrequency Double Average number of Attachment Views per User Reached.
AttachmentQuartile1 Int Long Form Video Views to 25%.
AttachmentQuartile2 Int Long Form Video Views to 50%.
AttachmentQuartile3 Int Long Form Video Views to 75%.
AttachmentTotalViewTimeMillis Long Total Attachment View Time (milli-seconds).
AttachmentUniques Int Number of unique attachment impressions.
AttachmentViewCompletion Int Long Form Video Views to completion.
AttachmentVideoViews Int Long Form Video Attachment Views, viewed for at least 10 consecutive seconds or reached 97% of the Long Form Video duration.
AvgViewTimeMillis Long Use avg_screen_time_millis instead. Average Top Snap view time per User Reached.
AvgScreenTimeMillis Long Average Top Snap view time across all impressions.
Frequency Double Average number of Impressions per User Reached.
IosInstalls Int Number of iOS App Installs.
IosInstallsApp Int Number of iOS App Installs.
IosInstallsWeb Int Number of iOS App Installs.
IosInstallsSwipeUp Int Number of iOS App Installs.
IosInstallsAppSwipeUp Int Number of iOS App Installs.
IosInstallsWebSwipeUp Int Number of iOS App Installs.
IosInstallsView Int Number of iOS App Installs.
IosInstallsAppView Int Number of iOS App Installs.
IosInstallsWebView Int Number of iOS App Installs.
SwipeUpPercent Double % of Impressions that Swiped-Up.
TotalInstalls Int Total number of App Installs.
TotalInstallsApp Int Total number of App Installs.
TotalInstallsWeb Int Total number of App Installs.
TotalInstallsSwipeUp Int Total number of App Installs.
TotalInstallsAppSwipeUp Int Total number of App Installs.
TotalInstallsWebSwipeUp Int Total number of App Installs.
TotalInstallsView Int Total number of App Installs.
TotalInstallsAppView Int Total number of App Installs.
TotalInstallsWebView Int Total number of App Installs.
Uniques Int Number of unique impressions.
VideoViewsTimeBased Int The total number of impressions that meet the qualifying video view criteria of at least 2 seconds, not including swipe ups.
VideoViews15s Int The total number of impressions that meet the qualifying video view criteria of at least 15 seconds, or 97% completion if it?s shorter than 15 seconds, or a swipe up action on the ad.
StoryOpens Int Number of times users tapped on the ad tile in the feed to view the Story Ad.
StoryCompletes Int Number of times users viewed through to the last Snap of your Story Ad.
PositionImpressions Int The impression number for this story ad position.
PositionUniques Int The unique viewer numbers for this story ad position.
PositionFrequency Double The frequency for this story ad position.
PositionScreenTimeMillis Long The total view time in milliseconds for this story ad position.
PositionSwipeUpPercent Double The swipe up rate for this story ad position.
AvgPositionScreenTimeMillis Long The average view time for this story ad position.
Shares Int Number of times lens/filter was shared in a Chat or Story.
Saves Int Number of times lens/filter was saved to Memories.
ConversionPurchases Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValue Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSave Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckout Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCart Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContent Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBilling Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUps Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearches Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletes Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpens Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViews Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribe Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClick Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorial Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInvite Int Number of attributed 'INVITE' conversion events.
ConversionLogin Int Number of attributed 'LOGIN' conversion events.
ConversionShare Int Number of attributed 'SHARE' conversion events.
ConversionReserve Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlocked Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlist Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCredits Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRate Int Number of attributed 'RATE' conversion events.
ConversionStartTrial Int Number of attributed 'START_TRIAL' conversion events.
ConversionListView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1 Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2 Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3 Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4 Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5 Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesSwipeUp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueSwipeUp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveSwipeUp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutSwipeUp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartSwipeUp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentSwipeUp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingSwipeUp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsSwipeUp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesSwipeUp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesSwipeUp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensSwipeUp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsSwipeUp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeSwipeUp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickSwipeUp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewSwipeUp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialSwipeUp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteSwipeUp Int Number of attributed 'INVITE' conversion events.
ConversionLoginSwipeUp Int Number of attributed 'LOGIN' conversion events.
ConversionShareSwipeUp Int Number of attributed 'SHARE' conversion events.
ConversionReserveSwipeUp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedSwipeUp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistSwipeUp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsSwipeUp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateSwipeUp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialSwipeUp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewSwipeUp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1SwipeUp Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2SwipeUp Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3SwipeUp Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4SwipeUp Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5SwipeUp Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesView Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueView Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveView Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutView Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartView Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentView Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingView Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsView Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesView Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesView Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensView Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsView Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeView Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickView Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialView Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteView Int Number of attributed 'INVITE' conversion events.
ConversionLoginView Int Number of attributed 'LOGIN' conversion events.
ConversionShareView Int Number of attributed 'SHARE' conversion events.
ConversionReserveView Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedView Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistView Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsView Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateView Int Number of attributed 'RATE' conversion events.
ConversionStartTrialView Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1View Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2View Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3View Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4View Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5View Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesApp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueApp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveApp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutApp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartApp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentApp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingApp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsApp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesApp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesApp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensApp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsApp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeApp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickApp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewApp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialApp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteApp Int Number of attributed 'INVITE' conversion events.
ConversionLoginApp Int Number of attributed 'LOGIN' conversion events.
ConversionShareApp Int Number of attributed 'SHARE' conversion events.
ConversionReserveApp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedApp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistApp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsApp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateApp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialApp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewApp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1App Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2App Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3App Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4App Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5App Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesAppSwipeUp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueAppSwipeUp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveAppSwipeUp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutAppSwipeUp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartAppSwipeUp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentAppSwipeUp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingAppSwipeUp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsAppSwipeUp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesAppSwipeUp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesAppSwipeUp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensAppSwipeUp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsAppSwipeUp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeAppSwipeUp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickAppSwipeUp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewAppSwipeUp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialAppSwipeUp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteAppSwipeUp Int Number of attributed 'INVITE' conversion events.
ConversionLoginAppSwipeUp Int Number of attributed 'LOGIN' conversion events.
ConversionShareAppSwipeUp Int Number of attributed 'SHARE' conversion events.
ConversionReserveAppSwipeUp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedAppSwipeUp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistAppSwipeUp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsAppSwipeUp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateAppSwipeUp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialAppSwipeUp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewAppSwipeUp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesAppView Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueAppView Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveAppView Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutAppView Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartAppView Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentAppView Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingAppView Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsAppView Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesAppView Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesAppView Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensAppView Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsAppView Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeAppView Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickAppView Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewAppView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialAppView Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteAppView Int Number of attributed 'INVITE' conversion events.
ConversionLoginAppView Int Number of attributed 'LOGIN' conversion events.
ConversionShareAppView Int Number of attributed 'SHARE' conversion events.
ConversionReserveAppView Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedAppView Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistAppView Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsAppView Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateAppView Int Number of attributed 'RATE' conversion events.
ConversionStartTrialAppView Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewAppView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1AppView Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2AppView Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3AppView Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4AppView Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5AppView Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesWeb Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueWeb Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveWeb Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutWeb Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartWeb Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentWeb Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingWeb Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsWeb Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesWeb Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesWeb Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensWeb Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsWeb Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeWeb Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickWeb Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewWeb Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialWeb Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteWeb Int Number of attributed 'INVITE' conversion events.
ConversionLoginWeb Int Number of attributed 'LOGIN' conversion events.
ConversionShareWeb Int Number of attributed 'SHARE' conversion events.
ConversionReserveWeb Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedWeb Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistWeb Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsWeb Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateWeb Int Number of attributed 'RATE' conversion events.
ConversionStartTrialWeb Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewWeb Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1Web Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2Web Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3Web Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4Web Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5Web Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesWebSwipeUp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueWebSwipeUp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveWebSwipeUp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutWebSwipeUp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartWebSwipeUp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentWebSwipeUp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingWebSwipeUp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsWebSwipeUp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesWebSwipeUp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesWebSwipeUp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensWebSwipeUp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsWebSwipeUp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeWebSwipeUp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickWebSwipeUp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewWebSwipeUp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialWebSwipeUp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteWebSwipeUp Int Number of attributed 'INVITE' conversion events.
ConversionLoginWebSwipeUp Int Number of attributed 'LOGIN' conversion events.
ConversionShareWebSwipeUp Int Number of attributed 'SHARE' conversion events.
ConversionReserveWebSwipeUp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedWebSwipeUp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistWebSwipeUp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsWebSwipeUp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateWebSwipeUp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialWebSwipeUp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewWebSwipeUp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesWebView Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueWebView Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveWebView Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutWebView Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartWebView Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentWebView Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingWebView Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsWebView Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesWebView Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesWebView Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensWebView Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsWebView Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeWebView Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickWebView Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewWebView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialWebView Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteWebView Int Number of attributed 'INVITE' conversion events.
ConversionLoginWebView Int Number of attributed 'LOGIN' conversion events.
ConversionShareWebView Int Number of attributed 'SHARE' conversion events.
ConversionReserveWebView Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedWebView Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistWebView Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsWebView Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateWebView Int Number of attributed 'RATE' conversion events.
ConversionStartTrialWebView Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewWebView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1WebView Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2WebView Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3WebView Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4WebView Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5WebView Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
BreakDownMetricsByPosition String
ConversionSourceTypes String
RetrieveSampleStats Bool

AdvancedDemographics

Lists all Advanced Demographics targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM AdvancedDemographics
Columns
Name Type References Description
Id [KEY] String The ID of the target option.
Name String The name of the target option.
Path String The path of the target option.
Source String The source of the target option.

AudienceInsights

Lists all audience insights based on the targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • AccountId supports the following operator: =
  • DimensionCategory supports the following operator: =

The following queries are processed server side:

SELECT * FROM AudienceInsights WHERE AccountId = '40b748fb-d16f-4b2a-8d63-a3547d01ba57' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us'
SELECT * FROM AudienceInsights WHERE AccountId = '40b748fb-d16f-4b2a-8d63-a3547d01ba57' AND DimensionCategory = 'demo' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us'

Note

AccountId, BaseSpecCountryCode and TargetingSpecCountryCode are required. OR logical operator and NOT clause are supported server side. Targeting options must be grouped based on the dimension category.

Targeting Option Dimension Category
AgeGroup demographics
MinAge demographics
MaxAge demographics
Gender demographics
Language demographics
AdvancedDemographics demographics
DeviceConnectionType devices
DeviceOSType devices
DeviceOSVersionMin devices
DeviceOSVersionMax devices
DeviceCarrierId devices
DeviceMake devices
CountryCode geos
RegionId geos
MetroId geos
ZipCode geos
LocationCategoryId locations
LocationProximity locations
LocationProximityUnit locations
Latitude locations
Longitude locations
Radius locations
Unit locations
SegmentId segments
InterestCategoryId interests
Example Targeting Specs

United States, Male+Female, All Age Ranges

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us'

United States, Male, Age Groups 21-34

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us'AND TargetingSpecAgeGroup IN ('21-24', '25-34') AND TargetingSpecGender = 'MALE'

Canada, Female, 13-20, iOS

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'ca' AND TargetingSpecMinAge = '13' AND TargetingSpecMaxAge = '20' AND TargetingSpecGender = 'FEMALE' AND TargetingSpecDeviceOSType = 'iOS'

UK, Male+Female, Age 25, WIFI Only

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'uk' AND TargetingSpecMinAge = '25' AND TargetingSpecMaxAge = '25' AND TargetingSpecDeviceConnectionType = 'WIFI'

United States - All States Except Arizona or Texas, M+F, All Ages

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND (TargetingSpecCountryCode = 'us' AND NOT(TargetingSpecCountryCode = 'us' AND TargetingSpecRegionId IN (3, 44)))

United States, Female, 18-34, 'Fashion & Style Gurus' OR 'Film & TV Fans'

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecGender = 'FEMALE' AND TargetingSpecAgeGroup IN ('18-20', '21-24', '25-34') AND TargetingSpecInterestCategoryId IN ('SLC_7', 'SLC_8')

United States, All genders/ages, 'Comedy Fans'

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecInterestCategoryId = 'SLC_36'

United States, Male, 18-20, member of SAM segment ID '12345'

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecGender = 'MALE' AND TargetingSpecAgeGroup = '18-20' AND TargetingSpecSegmentId = '12345'

United States, Male, 18-20, NOT a member of SAM segment ID '98765'

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecGender = 'MALE' AND TargetingSpecAgeGroup = '18-20' AND NOT TargetingSpecSegmentId = '98765'

United States, AT&T

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecDeviceCarrierId = 'US_ATT'

United States, 21-24, (College Graduates OR Married People), Apparel Shoppers

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecInterestCategoryId = 'DLXS_1' AND TargetingSpecAdvancedDemographics IN ('DLXD_100', 'DLXD_300') AND TargetingSpecAgeGroup = '21-24' AND TargetingSpecRegulatedContent = false

United States, metros New York or Los Angeles only

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecMetroId IN ('501', '803')

USA, Female, Spanish speaking, 13-17, iOS version 10.3.2

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecAgeGroup = '13-17' AND TargetingSpecGender = 'FEMALE' AND TargetingSpecLanguage = 'es' AND TargetingSpecDeviceOSType = 'ios' AND TargetingSpecDeviceOSVersionMin = '9.0' AND TargetingSpecDeviceOSVersionMax = '10.3.2'

Zipcode Targeting

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecZipCode IN ('90291', '90026')

Device Make: All iPhone 7 plus and iPhone 6s Plus users

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecDeviceMake IN ('Apple/iPhone 7 Plus/', 'Apple/iPhone 6s Plus/')

Location Categories: Targeting Sports Arenas, Fitness Centers

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND TargetingSpecLocationCategoryId IN ('LOI_15004', 'LOI_15002') AND TargetingSpecLocationProximityUnit = 'MILES' AND TargetingSpecLocationProximity = 1

Location Point Radius: Targeting 500 meter radius around Nordstrom locations in Seattle/Bellevue

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND ((TargetingSpecLatitude = 47.612447 AND TargetingSpecLongitude = -122.336751 AND TargetingSpecRadius = 500) OR (TargetingSpecLatitude = 47.617102 AND TargetingSpecLongitude = -122.203961 AND TargetingSpecRadius = 50 AND TargetingSpecUnit = 'KILOMETERS'))

Multi-country targeting: Targeting the US and Canada

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' OR TargetingSpecCountryCode = 'ca'

Snap Lifestyle Category inclusion of SLC_1, SLC_124 and exclusion of SLC_2

SELECT * FROM AudienceInsights WHERE AccountId = '02a1dac6-ffa2-49d9-b5b6-37bc31b9f3c2' AND BaseSpecCountryCode = 'us' AND TargetingSpecCountryCode = 'us' AND (TargetingSpecInterestCategoryId IN ('SLC_1', 'SLC_124') AND NOT TargetingSpecInterestCategoryId = 'SLC_2')
Columns
Name Type References Description
Id [KEY] String The insight Id.
AccountId String Accounts.Id The account Id.
Name String The insight name.
DimensionCategory String The dimension category of the insight.
Distribution String The distribution type of the insight.
TargetAudienceSizeMinimum String The minimum size of the target audience.
TargetAudienceSizeMaximum String The maximum size of the target audience.
ReferenceAudienceSizeMinimum String The minimum size of the target Reference.
ReferenceAudienceSizeMaximum String The maximum size of the target audience.
TargetAudiencePercent Decimal The target audience percent.
ReferenceAudiencePercent Decimal The reference audience percent.
TargetIndexToReference Decimal The target index to reference.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
BaseSpecAgeGroup String
TargetingSpecAgeGroup String
BaseSpecMinAge String
TargetingSpecMinAge String
BaseSpecMaxAge String
TargetingSpecMaxAge String
BaseSpecGender String
TargetingSpecGender String
BaseSpecLanguage String
TargetingSpecLanguage String
BaseSpecAdvancedDemographics String
TargetingSpecAdvancedDemographics String
BaseSpecDeviceConnectionType String
TargetingSpecDeviceConnectionType String
BaseSpecDeviceOSType String
TargetingSpecDeviceOSType String
BaseSpecDeviceOSVersionMin String
TargetingSpecDeviceOSVersionMin String
BaseSpecDeviceOSVersionMax String
TargetingSpecDeviceOSVersionMax String
BaseSpecDeviceCarrierId String
TargetingSpecDeviceCarrierId String
BaseSpecDeviceMake String
TargetingSpecDeviceMake String
BaseSpecCountryCode String
TargetingSpecCountryCode String
BaseSpecRegionId String
TargetingSpecRegionId String
BaseSpecMetroId String
TargetingSpecMetroId String
BaseSpecZipCode String
TargetingSpecZipCode String
BaseSpecLocationCategoryId String
TargetingSpecLocationCategoryId String
BaseSpecLocationProximity Int
TargetingSpecLocationProximity Int
BaseSpecLocationProximityUnit String
TargetingSpecLocationProximityUnit String
BaseSpecLatitude Decimal
TargetingSpecLatitude Decimal
BaseSpecLongitude Decimal
TargetingSpecLongitude Decimal
BaseSpecRadius Int
TargetingSpecRadius Int
BaseSpecUnit String
TargetingSpecUnit String
BaseSpecSegmentId String
TargetingSpecSegmentId String
BaseSpecInterestCategoryId String
TargetingSpecInterestCategoryId String
BaseSpecRegulatedContent Bool
TargetingSpecRegulatedContent Bool
BaseSpecEnableTargetingExpansion Bool
TargetingSpecEnableTargetingExpansion Bool

CampaignStats

Lists all campaign stats.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • AccountId supports the following operators: =,IN
  • CampaignId supports the following operators: =,IN
  • StartTime supports the following operator: =
  • EndTime supports the following operator: =
  • Granularity supports the following operator: =
  • Dimension supports the following operator: =
  • SwipeUpAttributionWindow supports the following operator: =
  • ViewAttributionWindow supports the following operator: =
  • ConversionSourceTypes supports the following operator: =

The following queries are processed server side:

SELECT * FROM CampaignStats WHERE AccountId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57'
SELECT * FROM CampaignStats WHERE AccountId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND StartTime = '01/02/2019' AND EndTime = '10/14/2020'
SELECT * FROM CampaignStats WHERE AccountId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND Dimension = 'Country'
SELECT * FROM CampaignStats WHERE AccountId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND Granularity = 'LIFETIME'
SELECT * FROM CampaignStats WHERE AccountId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND SwipeUpAttributionWindow = '1_DAY' AND ViewAttributionWindow = '1_HOUR'
SELECT * FROM CampaignStats WHERE AccountId = '40b748fb-d16f-4b3a-8d63-a3547d01ba57' AND ConversionSourceTypes = 'app'
SELECT * FROM CampaignStats WHERE CampaignId = '8adc3db7-8148-4fbf-999c-8d2266369d74'
SELECT * FROM CampaignStats WHERE CampaignId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND StartTime = '01/02/2019' AND EndTime = '10/14/2020'
SELECT * FROM CampaignStats WHERE CampaignId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND Dimension = 'Country'
SELECT * FROM CampaignStats WHERE CampaignId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND Granularity = 'LIFETIME'
SELECT * FROM CampaignStats WHERE CampaignId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND SwipeUpAttributionWindow = '1_DAY' AND ViewAttributionWindow = '1_HOUR'
SELECT * FROM CampaignStats WHERE CampaignId = '8adc3db7-8148-4fbf-999c-8d2266369d74' AND ConversionSourceTypes = 'app'

Note

You must specify either AccountId or CampaignId. If a time window is not specified, the stats for the last seven days or the last 31 days will be returned based on the specified granularity.

If you do not specify a wildcard column and specify one of the dimensions from the table below in the SELECT projection the stats will breakdown according to the specified dimension.

You can not specify dimensions with different dimension categories. You can only query one dimension at a time unless you are querying (age and gender) or (InterestCategoryId and InterestCategoryName) which may be combined.

Dimension Dimension Category
Country geos
Region geos
DMA geos
Gender demographics
Age demographics
InterestCategoryId interests
InterestCategoryName interests
OS devices
Make devices
Columns
Name Type References Description
AccountId String Accounts.Id The account Id.
CampaignId String Campaigns.Id The campaign Id.
StartTime Datetime Scopes the retrieved data to data collected in the window of time between StartTime and EndTime. Must be expressed in whole hours.
EndTime Datetime Scopes the retrieved data to data collected in the window of time between StartTime and EndTime. Must be expressed in whole hours.
FinalizedDataEndTime Datetime This defines the time up until when reporting metrics are finalized. You can query for all metrics before this time including uniques and reach and they will have the final numbers. For any time after the FinalizedDataEndTime the metrics are still undergoing de-duplication and finalization and may change accordingly.
IntervalStartTime Datetime Start time of the current interval. This applies only to Granularity DAY and HOUR.
IntervalEndTime Datetime End time of the current interval. This applies only to Granularity DAY and HOUR.
Granularity String Determines how granular the data points will be returned within the time range specified by StartTime and EndTime. For instance, when set to HOUR, you will be presented with a datapoint for each hour between StartTime and EndTime.
Dimension String You can get reporting insights based on different geographic, demographic, interest-based, and device-based dimensions. You can only query one dimension at a time unless you are querying age and gender which may be combined.
SwipeUpAttributionWindow String Attribution window for swipe ups.
ViewAttributionWindow String Attribution window for views.
Country String ISO country code.
Region String Region.
DMA Int DMA numeric code.
Gender String Gender.
Age String Age bucket.
InterestCategoryId String SnapchatAds User Lifestyle Interest Category Id.
InterestCategoryName String SnapchatAds User Lifestyle Interest Category Name.
OS String Device Operating System.
Make String Device Make (e.g., Apple, Samsung)
Impressions Int Impression Count.
Swipes Int Swipe-Up Count.
ViewTimeMillis Long Use screen_time_millis instead. Total Time Spent on top Snap Ad (milliseconds).
ScreenTimeMillis Long Total Time Spent on top Snap Ad (milliseconds).
Quartile1 Int Video Views to 25%.
Quartile2 Int Video Views to 50%.
Quartile3 Int Video Views to 75%.
ViewCompletion Int Video Views to completion.
Spend Decimal Amount Spent.
VideoViews Int The total number of impressions that meet the qualifying video view criteria of at least 2 seconds of consecutive watch time or a swipe up action on the Top Snap.
AndroidInstalls Int Number of Android App Installs.
AndroidInstallsApp Int Number of Android App Installs.
AndroidInstallsWeb Int Number of Android App Installs.
AndroidInstallsSwipeUp Int Number of Android App Installs.
AndroidInstallsAppSwipeUp Int Number of Android App Installs.
AndroidInstallsWebSwipeUp Int Number of Android App Installs.
AndroidInstallsView Int Number of Android App Installs.
AndroidInstallsAppView Int Number of Android App Installs.
AndroidInstallsWebView Int Number of Android App Installs.
AttachmentAvgViewTimeMillis Long Average Attachment View Time (milli-seconds).
AttachmentFrequency Double Average number of Attachment Views per User Reached.
AttachmentQuartile1 Int Long Form Video Views to 25%.
AttachmentQuartile2 Int Long Form Video Views to 50%.
AttachmentQuartile3 Int Long Form Video Views to 75%.
AttachmentTotalViewTimeMillis Long Total Attachment View Time (milli-seconds).
AttachmentUniques Int Number of unique attachment impressions.
AttachmentViewCompletion Int Long Form Video Views to completion.
AttachmentVideoViews Int Long Form Video Attachment Views, viewed for at least 10 consecutive seconds or reached 97% of the Long Form Video duration.
AvgViewTimeMillis Long Use avg_screen_time_millis instead. Average Top Snap view time per User Reached.
AvgScreenTimeMillis Long Average Top Snap view time across all impressions.
Frequency Double Average number of Impressions per User Reached.
IosInstalls Int Number of iOS App Installs.
IosInstallsApp Int Number of iOS App Installs.
IosInstallsWeb Int Number of iOS App Installs.
IosInstallsSwipeUp Int Number of iOS App Installs.
IosInstallsAppSwipeUp Int Number of iOS App Installs.
IosInstallsWebSwipeUp Int Number of iOS App Installs.
IosInstallsView Int Number of iOS App Installs.
IosInstallsAppView Int Number of iOS App Installs.
IosInstallsWebView Int Number of iOS App Installs.
SwipeUpPercent Double % of Impressions that Swiped-Up.
TotalInstalls Int Total number of App Installs.
TotalInstallsApp Int Total number of App Installs.
TotalInstallsWeb Int Total number of App Installs.
TotalInstallsSwipeUp Int Total number of App Installs.
TotalInstallsAppSwipeUp Int Total number of App Installs.
TotalInstallsWebSwipeUp Int Total number of App Installs.
TotalInstallsView Int Total number of App Installs.
TotalInstallsAppView Int Total number of App Installs.
TotalInstallsWebView Int Total number of App Installs.
Uniques Int Number of unique impressions.
VideoViewsTimeBased Int The total number of impressions that meet the qualifying video view criteria of at least 2 seconds, not including swipe ups.
VideoViews15s Int The total number of impressions that meet the qualifying video view criteria of at least 15 seconds, or 97% completion if it?s shorter than 15 seconds, or a swipe up action on the ad.
StoryOpens Int Number of times users tapped on the ad tile in the feed to view the Story Ad.
StoryCompletes Int Number of times users viewed through to the last Snap of your Story Ad.
PositionImpressions Int The impression number for this story ad position.
PositionUniques Int The unique viewer numbers for this story ad position.
PositionFrequency Double The frequency for this story ad position.
PositionScreenTimeMillis Long The total view time in milliseconds for this story ad position.
PositionSwipeUpPercent Double The swipe up rate for this story ad position.
AvgPositionScreenTimeMillis Long The average view time for this story ad position.
Shares Int Number of times lens/filter was shared in a Chat or Story.
Saves Int Number of times lens/filter was saved to Memories.
ConversionPurchases Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValue Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSave Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckout Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCart Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContent Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBilling Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUps Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearches Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletes Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpens Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViews Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribe Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClick Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorial Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInvite Int Number of attributed 'INVITE' conversion events.
ConversionLogin Int Number of attributed 'LOGIN' conversion events.
ConversionShare Int Number of attributed 'SHARE' conversion events.
ConversionReserve Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlocked Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlist Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCredits Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRate Int Number of attributed 'RATE' conversion events.
ConversionStartTrial Int Number of attributed 'START_TRIAL' conversion events.
ConversionListView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1 Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2 Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3 Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4 Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5 Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesSwipeUp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueSwipeUp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveSwipeUp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutSwipeUp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartSwipeUp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentSwipeUp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingSwipeUp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsSwipeUp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesSwipeUp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesSwipeUp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensSwipeUp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsSwipeUp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeSwipeUp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickSwipeUp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewSwipeUp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialSwipeUp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteSwipeUp Int Number of attributed 'INVITE' conversion events.
ConversionLoginSwipeUp Int Number of attributed 'LOGIN' conversion events.
ConversionShareSwipeUp Int Number of attributed 'SHARE' conversion events.
ConversionReserveSwipeUp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedSwipeUp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistSwipeUp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsSwipeUp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateSwipeUp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialSwipeUp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewSwipeUp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1SwipeUp Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2SwipeUp Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3SwipeUp Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4SwipeUp Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5SwipeUp Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesView Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueView Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveView Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutView Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartView Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentView Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingView Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsView Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesView Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesView Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensView Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsView Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeView Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickView Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialView Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteView Int Number of attributed 'INVITE' conversion events.
ConversionLoginView Int Number of attributed 'LOGIN' conversion events.
ConversionShareView Int Number of attributed 'SHARE' conversion events.
ConversionReserveView Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedView Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistView Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsView Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateView Int Number of attributed 'RATE' conversion events.
ConversionStartTrialView Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1View Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2View Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3View Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4View Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5View Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesApp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueApp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveApp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutApp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartApp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentApp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingApp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsApp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesApp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesApp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensApp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsApp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeApp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickApp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewApp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialApp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteApp Int Number of attributed 'INVITE' conversion events.
ConversionLoginApp Int Number of attributed 'LOGIN' conversion events.
ConversionShareApp Int Number of attributed 'SHARE' conversion events.
ConversionReserveApp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedApp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistApp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsApp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateApp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialApp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewApp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1App Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2App Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3App Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4App Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5App Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesAppSwipeUp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueAppSwipeUp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveAppSwipeUp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutAppSwipeUp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartAppSwipeUp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentAppSwipeUp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingAppSwipeUp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsAppSwipeUp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesAppSwipeUp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesAppSwipeUp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensAppSwipeUp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsAppSwipeUp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeAppSwipeUp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickAppSwipeUp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewAppSwipeUp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialAppSwipeUp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteAppSwipeUp Int Number of attributed 'INVITE' conversion events.
ConversionLoginAppSwipeUp Int Number of attributed 'LOGIN' conversion events.
ConversionShareAppSwipeUp Int Number of attributed 'SHARE' conversion events.
ConversionReserveAppSwipeUp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedAppSwipeUp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistAppSwipeUp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsAppSwipeUp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateAppSwipeUp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialAppSwipeUp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewAppSwipeUp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5AppSwipeUp Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesAppView Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueAppView Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveAppView Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutAppView Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartAppView Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentAppView Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingAppView Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsAppView Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesAppView Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesAppView Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensAppView Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsAppView Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeAppView Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickAppView Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewAppView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialAppView Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteAppView Int Number of attributed 'INVITE' conversion events.
ConversionLoginAppView Int Number of attributed 'LOGIN' conversion events.
ConversionShareAppView Int Number of attributed 'SHARE' conversion events.
ConversionReserveAppView Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedAppView Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistAppView Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsAppView Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateAppView Int Number of attributed 'RATE' conversion events.
ConversionStartTrialAppView Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewAppView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1AppView Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2AppView Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3AppView Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4AppView Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5AppView Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesWeb Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueWeb Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveWeb Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutWeb Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartWeb Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentWeb Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingWeb Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsWeb Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesWeb Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesWeb Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensWeb Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsWeb Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeWeb Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickWeb Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewWeb Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialWeb Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteWeb Int Number of attributed 'INVITE' conversion events.
ConversionLoginWeb Int Number of attributed 'LOGIN' conversion events.
ConversionShareWeb Int Number of attributed 'SHARE' conversion events.
ConversionReserveWeb Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedWeb Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistWeb Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsWeb Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateWeb Int Number of attributed 'RATE' conversion events.
ConversionStartTrialWeb Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewWeb Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1Web Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2Web Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3Web Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4Web Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5Web Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesWebSwipeUp Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueWebSwipeUp Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveWebSwipeUp Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutWebSwipeUp Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartWebSwipeUp Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentWebSwipeUp Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingWebSwipeUp Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsWebSwipeUp Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesWebSwipeUp Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesWebSwipeUp Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensWebSwipeUp Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsWebSwipeUp Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeWebSwipeUp Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickWebSwipeUp Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewWebSwipeUp Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialWebSwipeUp Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteWebSwipeUp Int Number of attributed 'INVITE' conversion events.
ConversionLoginWebSwipeUp Int Number of attributed 'LOGIN' conversion events.
ConversionShareWebSwipeUp Int Number of attributed 'SHARE' conversion events.
ConversionReserveWebSwipeUp Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedWebSwipeUp Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistWebSwipeUp Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsWebSwipeUp Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateWebSwipeUp Int Number of attributed 'RATE' conversion events.
ConversionStartTrialWebSwipeUp Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewWebSwipeUp Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5WebSwipeUp Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
ConversionPurchasesWebView Int Number of attributed 'PURCHASE' conversion events.
ConversionPurchasesValueWebView Decimal Value of attributed 'PURCHASE' conversion events (microcurrency in Ad Account's currency).
ConversionSaveWebView Int Number of attributed 'SAVE' conversion events.
ConversionStartCheckoutWebView Int Number of attributed 'START_CHECKOUT' conversion events.
ConversionAddCartWebView Int Number of attributed 'ADD_CART' conversion events.
ConversionViewContentWebView Int Number of attributed 'VIEW_CONTENT' conversion events.
ConversionAddBillingWebView Int Number of attributed 'ADD_BILLING' conversion events.
ConversionSignUpsWebView Int Number of attributed 'SIGN_UP' conversion events.
ConversionSearchesWebView Int Number of attributed 'SEARCH' conversion events.
ConversionLevelCompletesWebView Int Number of attributed 'LEVEL_COMPLETE' conversion events.
ConversionAppOpensWebView Int Number of attributed 'APP_OPEN' conversion events.
ConversionPageViewsWebView Int Number of attributed 'PAGE_VIEW' conversion events.
ConversionSubscribeWebView Int Number of attributed 'SUBSCRIBE' conversion events.
ConversionAdClickWebView Int Number of attributed 'AD_CLICK' conversion events.
ConversionAdViewWebView Int Number of attributed 'AD_VIEW' conversion events.
ConversionCompleteTutorialWebView Int Number of attributed 'COMPLETE_TUTORIAL' conversion events.
ConversionInviteWebView Int Number of attributed 'INVITE' conversion events.
ConversionLoginWebView Int Number of attributed 'LOGIN' conversion events.
ConversionShareWebView Int Number of attributed 'SHARE' conversion events.
ConversionReserveWebView Int Number of attributed 'RESERVE' conversion events.
ConversionAchievementUnlockedWebView Int Number of attributed 'ACHIEVEMENT_UNLOCKED' conversion events.
ConversionAddToWishlistWebView Int Number of attributed 'ADD_TO_WISHLIST' conversion events.
ConversionSpendCreditsWebView Int Number of attributed 'SPENT_CREDITS' conversion events.
ConversionRateWebView Int Number of attributed 'RATE' conversion events.
ConversionStartTrialWebView Int Number of attributed 'START_TRIAL' conversion events.
ConversionListViewWebView Int Number of attributed 'LIST_VIEW' conversion events.
CustomEvent1WebView Int Number of attributed 'CUSTOM_EVENT_1' conversion events.
CustomEvent2WebView Int Number of attributed 'CUSTOM_EVENT_2' conversion events.
CustomEvent3WebView Int Number of attributed 'CUSTOM_EVENT_3' conversion events.
CustomEvent4WebView Int Number of attributed 'CUSTOM_EVENT_4' conversion events.
CustomEvent5WebView Int Number of attributed 'CUSTOM_EVENT_5' conversion events.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
ConversionSourceTypes String
RetrieveSampleStats Bool

Creatives

Retrieves all creatives associated with an ad account

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =
  • AccountId supports the following operator: =; If no value is specified, the connector will try to get the first Account from the list returned by the Accounts view.

The following queries are processed server side:

SELECT * FROM Creatives WHERE Id = 'c1e6e929-acec-466f-b023-852b8cacc18f'
SELECT * FROM Creatives WHERE AccountId = '331deb8082b8-a1d5-4579-9f7c-2e874d37'
Columns
Name Type References Description
Id [KEY] String ID of the creative.
UpdatedAt Datetime The date when the entity was last updated.
CreatedAt Datetime The creation date of the entity.
Name String Creative name.
Headline String Creative headline.
AccountId String Accounts.Id Creative Account ID.
Type String Creative type. The allowed values are SNAP_AD, APP_INSTALL, LONGFORM_VIDEO, WEB_VIEW, DEEP_LINK, AD_TO_LENS, AD_TO_CALL, AD_TO_MESSAGE, PREVIEW, COMPOSITE, FILTER, LENS, LENS_WEB_VIEW, LENS_APP_INSTALL, LENS_DEEP_LINK, LENS_LONGFORM_VIDEO, COLLECTION.
PackagingStatus String Packaging Status. The allowed values are PENDING, SUCCESS, IN_PROGRESS.
ReviewStatus String Review Status.
Shareable Boolean Allow Users to Share with Friends
TopSnapMediaId String Top Snap Media ID.
CallToAction String Call to Action. The allowed values are BLANK, INSTALL_NOW, WATCH, VIEW_MORE, WATCH_EPISODE, DOWNLOAD, PLAY, SHOP_NOW, SIGN_UP, USE_APP, APPLY_NOW, BOOK_NOW, BUY_TICKETS, GET_NOW, LISTEN, MORE, ORDER_NOW, READ, SHOW, SHOWTIMES, VIEW, OPEN_APP, TRY.
TopSnapCropPosition String Top Snap Crop Position. The allowed values are OPTIMIZED, MIDDLE, TOP, BOTTOM.
LongformVideoProperties String Long Form Video Properties.
AppInstallProperties String App Install Properties.
WebViewProperties String Web View Properties.

DemographicsAgeGroups

Lists all age group targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM DemographicsAgeGroups
Columns
Name Type References Description
Id [KEY] String ID of the target option.
Name String The name of the target option.

DemographicsGender

Lists all gender targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM DemographicsGender
Columns
Name Type References Description
Id [KEY] String ID of the target option.
Name String The name of the target option.

DemographicsLanguages

Lists all language targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM DemographicsLanguages
Columns
Name Type References Description
Id [KEY] String ID of the target option.
Name String The name of the target option.

DeviceCarriers

Lists all device carrier targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM DeviceCarriers
Columns
Name Type References Description
Id [KEY] String The ID of the targeting option.
Name String The name of the targeting option.
ValidCountry String The valid country of the targeting option.

DeviceConnectionTypes

Lists all device connection type targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM DeviceConnectionTypes
Columns
Name Type References Description
Id [KEY] String The ID of the target option.
Name String The name of the target option.

DeviceMakes

Lists all device make targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM DeviceMakes
Columns
Name Type References Description
Id [KEY] String The ID of the targeting option.
Name String The name of the targeting option.

DeviceOSTypes

Lists all device OS type targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM DeviceOSTypes
Columns
Name Type References Description
Id [KEY] String The ID of the targeting option.
Name String The name of the targeting option.

DeviceOSVersions

Lists all device OS version targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM DeviceOSVersions
Columns
Name Type References Description
Id [KEY] String The ID of the targeting option.
DeviceOSType String DeviceOSTypes.Name The device OS type.
Name String The name of the targeting option.

FundingSources

Lists all funding sources for the specified Organization.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =,IN
  • OrganizationId supports the following operators: =,IN; If no value is specified, the connector will try to get the first organization from the list returned by the Organizations view.

The following queries are processed server side:

SELECT * FROM FundingSources WHERE OrganizationId = '2e874d37-a1d5-4579-9f7c-331deb8082b8'
SELECT * FROM FundingSources WHERE OrganizationId IN ('2e874d37-a1d5-4579-9f7c-331deb8082b8', '331deb8082b8-a1d5-4579-9f7c-2e874d37')
SELECT * FROM FundingSources WHERE Id = '69b96ded-4871-4750-83ba-8f19507f6bdd'
SELECT * FROM FundingSources WHERE ID IN ('69b96ded-4871-4750-83ba-8f19507f6bdd', '83ba-69b96ded-4871-4750-8f19507f6bdd')
Columns
Name Type References Description
Id [KEY] String ID of the funding source.
OrganizationId String Organizations.Id The ID of the organization.
CreatedAt Datetime Date of creation.
UpdatedAt Datetime Date of last update.
Type String Funding Source type. The allowed values are LINE_OF_CREDIT, CREDIT_CARD, COUPON, PAYPAL.
Status String Status of the funding source. The allowed values are ACTIVE, REDEEMED, SPENT, EXPIRED, DELETED.
BudgetSpent Decimal Budget Spent.
Currency String Account currency. The allowed values are USD, CAD, GBP, AUD, EUR.
TotalBudget Decimal Total Budget.
AvailableCredit Decimal Total available credit.
CardType String Credit Card Type. The allowed values are AMEX, DINERS_CLUB, DISCOVER, JCB, MAESTRO, MASTERCARD, VISA, UNKNOWN.
Name String Name of the Credit Card.
Last4 Int Last 4 digits of the Credit Card.
ExpirationYear Int Expiration year of the Credit Card.
ExpirationMonth Int Expiration month of the Credit Card.
DailySpendLimit Decimal Daily spend limit for Credit Card.
DailySpendLimitCurrency String Currency for the DailySpendLimit. The allowed values are USD, CAD, GBP, AUD, EUR.
Value Decimal Value of the COUPON.
StartDate Datetime Start date of the COUPON.
EndDate Datetime End date of the COUPON.
Email String Email associated with Paypal.

GeolocationCountries

Lists all country targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM GeolocationCountries
Columns
Name Type References Description
Id [KEY] String The ID of the country.
Name String The country name.
Code String The country code.
Latitude Decimal The country latitude.
Longitude Decimal The country longitude.
ContinentId String The continent ID.
ContinentName String The name of the continent.

GeolocationMetros

Lists all metro/dma targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • CountryCode supports the following operator: =

The following queries are processed server side:

SELECT * FROM GeolocationMetros WHERE CountryCode = 'ca'
Columns
Name Type References Description
Id [KEY] String The ID of the metro.
CountryCode String GeolocationCountries.Code The country code. The default value is us.
Name String The metro name.
Regions String The metro regions.
Latitude Decimal The metro latitude.
Longitude Decimal The metro longitude.

GeolocationRegions

Lists all region/state targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • CountryCode supports the following operator: =

The following queries are processed server side:

SELECT * FROM GeolocationRegions WHERE CountryCode = 'ca'
Columns
Name Type References Description
Id [KEY] String The ID of the region.
CountryCode String GeolocationCountries.Code The country code. The default value is us.
Name String The region name.
Code String The region code.
Latitude Decimal The region latitude.
Longitude Decimal The region longitude.

GeolocationZipCodes

Lists all of zipcode targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • CountryCode supports the following operator: =

The following queries are processed server side:

SELECT * FROM GeolocationZipCodes WHERE CountryCode = 'ca'
Columns
Name Type References Description
Code [KEY] String The zip code.
CountryCode String GeolocationCountries.Code The country code. The default value is us.
CityName String The city name.

Invoices

Lists all invoices for a given Ad Account.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =
  • AccountId supports the following operators: =,IN; If specified, it will override the value of the AccountId connection property. Otherwise, if no value is specified, the connector will try to get the first account from the list returned by the Accounts view.

The following queries are processed server side:

SELECT * FROM Invoices WHERE AccountId = '4b591696-3017-4852-85d2-dc7d50157153'
SELECT * FROM Invoices WHERE AccountId = '4b591696-3017-4852-85d2-dc7d50157153' AND ID = '861b7c55-7e35-4348-918f-3758db350b80'
Columns
Name Type References Description
Id [KEY] String Invoice ID.
AccountId [KEY] String Accounts.Id Ad Account ID.
OrganizationId String Organizations.Id The ID of the organization.
NetsuiteFileId String Snap Internal ID.
CustomerName String Customer name.
CustomerNetsuiteId String Snap Internal ID.
DocumentNumber Int Document number.
LineLastModified Datetime The date when the line was last updated.
LastModified Datetime The date when the invoice was last updated.
Amount Decimal Invoice amount.
Currency String Currency of the invoice. The allowed values are AUD, CAD, EUR, GBP, USD, SEK, DKK, NOK.
BillingPeriod String Specifies the billing period.
DueDate Datetime Due date of the invoice.
CreatedAt Datetime The creation date of the invoice.
InvoiceStatus String Indicates whether the invoice has been collected. The allowed values are COLLECTED, SENT_FOR_COLLECTION.
InvoiceContent String Bytestream (Base64), this Bytestream can turned into a PDF.

LocationCategories

Lists all location categories.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM LocationCategories
Columns
Name Type References Description
Id [KEY] String The ID of the location category.
Name String The location category name.
ParentId String The parent ID of the location category.
Path String The path of the location category.
Source String The source of the location category.

NielsenInterests

Lists all Nielsen Interests targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM NielsenInterests
Columns
Name Type References Description
Id [KEY] String The ID of the Nielsen interest.
Name String The Nielsen interest name.
ParentId String The parent ID of the Nielsen interest.
Path String The path of the Nielsen interest.
Source String The source of the Nielsen interest.

Organizations

Lists all the organizations where the authenticated user has access.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the following operator: =,IN

The following queries are processed server side:

SELECT * FROM Organizations WHERE Id = '69b96ded-4871-4750-83ba-8f19507f6bdd'
SELECT * FROM Organizations WHERE ID IN ('69b96ded-4871-4750-83ba-8f19507f6bdd', '83ba-69b96ded-4871-4750-8f19507f6b')
Columns
Name Type References Description
Id [KEY] String Unique identifier of the organization.
Name String The organization name.
CreatedAt Datetime Identifies the date and time when the organization was created.
UpdatedAt Datetime Identifies the date and time when the organization was updated.
AddressLine1 String Address line 1.
Locality String Locality.
AdministrativeDistrictLevel1 String AdministrativeDistrictLevel.
Country String Country.
PostalCode String Zip/Postal Code.
ContactEmail String Contact email.
ContactName String Contact name.
ContactPhone String Contact phone.
Type String The organization type.
State String The organization state.
Roles String Roles.
ConfigurationSettings String Configuration settings.

PlacedVisitationSegmentsInterests

Lists all interest targeting based on Placed Visitation Segments.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector. The following queries are processed server side:

SELECT * FROM PlacedVisitationSegmentsInterests
Columns
Name Type References Description
Id [KEY] String The ID of the interest.
Name String The interest name.
ParentId String The parent ID of the interest.
Path String The path of the interest.
Source String The source of the interest.

SnapLifeStyleCategoriesInterests

Lists all Snap Lifestyle Categories targeting options.

Select

The connector will use the Snapchat Ads API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • CountryCode supports the following operator: =

The following queries are processed server side:

SELECT * FROM SnapLifeStyleCategoriesInterests WHERE CountryCode = 'ca'
Columns
Name Type References Description
Id [KEY] String The ID of the targeting option.
CountryCode String GeolocationCountries.Code The country code.
Name String The name of the lifestyle category.
ParentId String The parent ID of the lifestyle category.
Path String The path of the lifestyle category.
Source String The source of the lifestyle category.

Stored Procedures

Stored procedures are function-like interfaces that extend the functionality of the connector beyond simple SELECT/INSERT/UPDATE/DELETE operations with Snapchat Ads.

Stored procedures accept a list of parameters, perform their intended function, and then return any relevant response data from Snapchat Ads, along with an indication of whether the procedure succeeded or failed.

Snapchat Ads Connector Stored Procedures

Name Description
AddAudienceSegmentUsers Add specific users to an audience segment.
CreateLookalikeSegment Create a Snap Audience Match Lookalike Segment within a specified ad account.
GetOAuthAccessToken Gets an authentication token from SnapchatAds.
GetOAuthAuthorizationURL Gets the GitHub authorization URL. Access the URL returned in the output in a Web browser. This requests the access token that can be used as part of the connection string to SnapchatAds.
RefreshOAuthAccessToken Refreshes the OAuth access token used for authentication with Zuora.
RemoveAudienceSegmentUsers Remove specific users or all users from specified Snap Audience Match segment

AddAudienceSegmentUsers

Add specific users to an audience segment.

Execute

You can add users to a specific audience segment by specifying a list of identifiers:

EXECUTE AddAudienceSegmentUsers AudienceSegmentId = '5603670370513719', IdentifierType = 'PHONE', Identifiers = '001-234-567-8910,+44 844 412 4653'

You can add users to a specific audience segment by specifying a CSV file with a list of identifiers:

EXECUTE AddAudienceSegmentUsers AudienceSegmentId = '5603670370513719', IdentifierType = 'PHONE', CSVFilePath = 'C:\identifiers.csv'
Input
Name Type Required Description
AudienceSegmentId String True The ID of the audience segment.
IdentifierType String True The identifier type. The allowed values are EMAIL, MOBILE_ADVERTISER_ID, PHONE.
Identifiers String False Comma-separated list of email, phone number or mobile identifiers.
CSVFilePath String False The path of the csv file.
Result Set Columns
Name Type Description
Success Bool Whether the request was successful or not.
NumberOfUploadedUsers Int The number of the uploaded users.

CreateLookalikeSegment

Create a Snap Audience Match Lookalike Segment within a specified ad account.

Execute
EXECUTE CreateLookalikeSegment AccountId = '8adc3db7-8148-4fbf-999c-8d2266369d74', SeedSegmentId = '5677923948298240', Country = 'US', Type = 'REACH', Name = 'lookalikes of all the sams in the world', Description = 'similar to all the sams in the world', RetentionInDays = '180'
Input
Name Type Required Description
AccountId String True Ad Account ID.
SeedSegmentId String True Seed Audience Segment ID.
Country String True ISO-2 Country Code.
Type String False The type of Lookalike to be created. The allowed values are BALANCE, SIMILARITY, REACH. The default value is BALANCE.
Name String True Audience Segment name.
RetentionInDays Int True Number of days to retain audience members.
Description String False Audience Segment Description.
Result Set Columns
Name Type Description
SegmentId String The ID of the newly created Lookalike Segment.

GetOAuthAccessToken

Gets an authentication token from SnapchatAds.

Input
Name Type Required Description
AuthMode String False The type of authentication mode to use. The allowed values are APP, WEB. The default value is APP.
Verifier String False The verifier token returned by GitHub after using the URL obtained with GetOAuthAuthorizationURL. Required for only the Web AuthMode.
Scope String False The scope or permissions you are requesting. The default value is snapchat-marketing-api.
CallbackUrl String False The URL the user will be redirected to after authorizing your application.
State String False This field indicates any state that may be useful to your application upon receipt of the response. Your application receives the same value it sent, as this parameter makes a round-trip to GitHub authorization server and back. Uses include redirecting the user to the correct resource in your site, using nonces, and mitigating cross-site request forgery.
Result Set Columns
Name Type Description
OAuthAccessToken String The authentication token returned from GitHub.
OAuthRefreshToken String A token that may be used to obtain a new access token.
ExpiresIn String The remaining lifetime for the access token in seconds.

GetOAuthAuthorizationURL

Gets the GitHub authorization URL. Access the URL returned in the output in a Web browser. This requests the access token that can be used as part of the connection string to SnapchatAds.

Input
Name Type Required Description
CallbackUrl String False The URL that GitHub will return to after the user has authorized your app.
Scope String False The scope or permissions you are requesting. The default value is snapchat-marketing-api.
State String False This field indicates any state that may be useful to your application upon receipt of the response. Your application receives the same value it sent, as this parameter makes a round-trip to GitHub authorization server and back. Uses include redirecting the user to the correct resource in your site, using nonces, and mitigating cross-site request forgery.
Result Set Columns
Name Type Description
URL String The URL to be entered into a Web browser to obtain the verifier token and authorize the data provider with.

RefreshOAuthAccessToken

Refreshes the OAuth access token used for authentication with Zuora.

Input
Name Type Required Description
OAuthRefreshToken String True Set this to the token value that expired.
Result Set Columns
Name Type Description
OAuthAccessToken String The authentication token returned from Zuora. This can be used in subsequent calls to other operations for this particular service.
OAuthRefreshToken String This is the same as the access token.
ExpiresIn String The remaining lifetime on the access token.

RemoveAudienceSegmentUsers

Remove specific users or all users from specified Snap Audience Match segment

Execute

You can remove users from a specific audience segment by specifying a list of identifiers:

EXECUTE RemoveAudienceSegmentUsers AudienceSegmentId = '5603670370513719', IdentifierType = 'PHONE', Identifiers = '001-234-567-8910,+44 844 412 4653'

You can remove users from a specific audience segment by specifying a CSV file with a list of identifiers:

EXECUTE RemoveAudienceSegmentUsers AudienceSegmentId = '5603670370513719', IdentifierType = 'PHONE', CSVFilePath = 'C:\identifiers.csv'

You can also remove all users from a specific audience segment:

EXECUTE RemoveAudienceSegmentUsers AudienceSegmentId = '5603670370513719', RemoveAllUsers = true
Input
Name Type Required Description
AudienceSegmentId String True The ID of the audience segment.
IdentifierType String False The identifier type. The allowed values are EMAIL, MOBILE_ADVERTISER_ID, PHONE.
Identifiers String False Comma-separated list of email, phone number or mobile identifiers.
CSVFilePath String False The path of the csv file.
RemoveAllUsers Bool False Whether to delete all users or not.
Result Set Columns
Name Type Description
Success Bool Whether the request was successful or not.
NumberOfUploadedUsers Int The number of the uploaded users.

System Tables

You can query the system tables described in this section to access schema information, information on data source functionality, and batch operation statistics.

Schema Tables

The following tables return database metadata for Snapchat Ads:

Data Source Tables

The following tables return information about how to connect to and query the data source:

  • sys_connection_props: Returns information on the available connection properties.
  • sys_sqlinfo: Describes the SELECT queries that the connector can offload to the data source.

Query Information Tables

The following table returns query statistics for data modification queries:

  • sys_identity: Returns information about batch operations or single updates.

sys_catalogs

Lists the available databases.

The following query retrieves all databases determined by the connection string:

SELECT * FROM sys_catalogs
Columns
Name Type Description
CatalogName String The database name.

sys_schemas

Lists the available schemas.

The following query retrieves all available schemas:

SELECT * FROM sys_schemas
Columns
Name Type Description
CatalogName String The database name.
SchemaName String The schema name.

sys_tables

Lists the available tables.

The following query retrieves the available tables and views:

SELECT * FROM sys_tables
Columns
Name Type Description
CatalogName String The database containing the table or view.
SchemaName String The schema containing the table or view.
TableName String The name of the table or view.
TableType String The table type (table or view).
Description String A description of the table or view.
IsUpdateable Boolean Whether the table can be updated.

sys_tablecolumns

Describes the columns of the available tables and views.

The following query returns the columns and data types for the Campaigns table:

SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='Campaigns'
Columns
Name Type Description
CatalogName String The name of the database containing the table or view.
SchemaName String The schema containing the table or view.
TableName String The name of the table or view containing the column.
ColumnName String The column name.
DataTypeName String The data type name.
DataType Int32 An integer indicating the data type. This value is determined at run time based on the environment.
Length Int32 The storage size of the column.
DisplaySize Int32 The designated column's normal maximum width in characters.
NumericPrecision Int32 The maximum number of digits in numeric data. The column length in characters for character and date-time data.
NumericScale Int32 The column scale or number of digits to the right of the decimal point.
IsNullable Boolean Whether the column can contain null.
Description String A brief description of the column.
Ordinal Int32 The sequence number of the column.
IsAutoIncrement String Whether the column value is assigned in fixed increments.
IsGeneratedColumn String Whether the column is generated.
IsHidden Boolean Whether the column is hidden.
IsArray Boolean Whether the column is an array.
IsReadOnly Boolean Whether the column is read-only.
IsKey Boolean Indicates whether a field returned from sys_tablecolumns is the primary key of the table.
ColumnType String The role or classification of the column in the schema. Possible values include SYSTEM, LINKEDCOLUMN, NAVIGATIONKEY, REFERENCECOLUMN, and NAVIGATIONPARENTCOLUMN.

sys_procedures

Lists the available stored procedures.

The following query retrieves the available stored procedures:

SELECT * FROM sys_procedures
Columns
Name Type Description
CatalogName String The database containing the stored procedure.
SchemaName String The schema containing the stored procedure.
ProcedureName String The name of the stored procedure.
Description String A description of the stored procedure.
ProcedureType String The type of the procedure, such as PROCEDURE or FUNCTION.

sys_procedureparameters

Describes stored procedure parameters.

The following query returns information about all of the input parameters for the RemoveAudienceSegmentUsers stored procedure:

SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'RemoveAudienceSegmentUsers' AND Direction = 1 OR Direction = 2

To include result set columns in addition to the parameters, set the IncludeResultColumns pseudo column to True:

SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'RemoveAudienceSegmentUsers' AND IncludeResultColumns='True'
Columns
Name Type Description
CatalogName String The name of the database containing the stored procedure.
SchemaName String The name of the schema containing the stored procedure.
ProcedureName String The name of the stored procedure containing the parameter.
ColumnName String The name of the stored procedure parameter.
Direction Int32 An integer corresponding to the type of the parameter: input (1), input/output (2), or output(4). input/output type parameters can be both input and output parameters.
DataType Int32 An integer indicating the data type. This value is determined at run time based on the environment.
DataTypeName String The name of the data type.
NumericPrecision Int32 The maximum precision for numeric data. The column length in characters for character and date-time data.
Length Int32 The number of characters allowed for character data. The number of digits allowed for numeric data.
NumericScale Int32 The number of digits to the right of the decimal point in numeric data.
IsNullable Boolean Whether the parameter can contain null.
IsRequired Boolean Whether the parameter is required for execution of the procedure.
IsArray Boolean Whether the parameter is an array.
Description String The description of the parameter.
Ordinal Int32 The index of the parameter.
Values String The values you can set in this parameter are limited to those shown in this column. Possible values are comma-separated.
SupportsStreams Boolean Whether the parameter represents a file that you can pass as either a file path or a stream.
IsPath Boolean Whether the parameter is a target path for a schema creation operation.
Default String The value used for this parameter when no value is specified.
SpecificName String A label that, when multiple stored procedures have the same name, uniquely identifies each identically-named stored procedure. If there's only one procedure with a given name, its name is simply reflected here.
IsProvided Boolean Whether the procedure is added/implemented by , as opposed to being a native Snapchat Ads procedure.
Pseudo-Columns
Name Type Description
IncludeResultColumns Boolean Whether the output should include columns from the result set in addition to parameters. Defaults to False.

sys_keycolumns

Describes the primary and foreign keys.

The following query retrieves the primary key for the Campaigns table:

SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='Campaigns'
Columns
Name Type Description
CatalogName String The name of the database containing the key.
SchemaName String The name of the schema containing the key.
TableName String The name of the table containing the key.
ColumnName String The name of the key column.
IsKey Boolean Whether the column is a primary key in the table referenced in the TableName field.
IsForeignKey Boolean Whether the column is a foreign key referenced in the TableName field.
PrimaryKeyName String The name of the primary key.
ForeignKeyName String The name of the foreign key.
ReferencedCatalogName String The database containing the primary key.
ReferencedSchemaName String The schema containing the primary key.
ReferencedTableName String The table containing the primary key.
ReferencedColumnName String The column name of the primary key.

sys_foreignkeys

Describes the foreign keys.

The following query retrieves all foreign keys which refer to other tables:

SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
Columns
Name Type Description
CatalogName String The name of the database containing the key.
SchemaName String The name of the schema containing the key.
TableName String The name of the table containing the key.
ColumnName String The name of the key column.
PrimaryKeyName String The name of the primary key.
ForeignKeyName String The name of the foreign key.
ReferencedCatalogName String The database containing the primary key.
ReferencedSchemaName String The schema containing the primary key.
ReferencedTableName String The table containing the primary key.
ReferencedColumnName String The column name of the primary key.
ForeignKeyType String Designates whether the foreign key is an import (points to other tables) or export (referenced from other tables) key.

sys_primarykeys

Describes the primary keys.

The following query retrieves the primary keys from all tables and views:

SELECT * FROM sys_primarykeys
Columns
Name Type Description
CatalogName String The name of the database containing the key.
SchemaName String The name of the schema containing the key.
TableName String The name of the table containing the key.
ColumnName String The name of the key column.
KeySeq String The sequence number of the primary key.
KeyName String The name of the primary key.

sys_indexes

Describes the available indexes. By filtering on indexes, you can write more selective queries with faster query response times.

The following query retrieves all indexes that are not primary keys:

SELECT * FROM sys_indexes WHERE IsPrimary='false'
Columns
Name Type Description
CatalogName String The name of the database containing the index.
SchemaName String The name of the schema containing the index.
TableName String The name of the table containing the index.
IndexName String The index name.
ColumnName String The name of the column associated with the index.
IsUnique Boolean True if the index is unique. False otherwise.
IsPrimary Boolean True if the index is a primary key. False otherwise.
Type Int16 An integer value corresponding to the index type: statistic (0), clustered (1), hashed (2), or other (3).
SortOrder String The sort order: A for ascending or D for descending.
OrdinalPosition Int16 The sequence number of the column in the index.

sys_connection_props

Returns information on the available connection properties and those set in the connection string.

The following query retrieves all connection properties that have been set in the connection string or set through a default value:

SELECT * FROM sys_connection_props WHERE Value <> ''
Columns
Name Type Description
Name String The name of the connection property.
ShortDescription String A brief description.
Type String The data type of the connection property.
Default String The default value if one is not explicitly set.
Values String A comma-separated list of possible values. A validation error is thrown if another value is specified.
Value String The value you set or a preconfigured default.
Required Boolean Whether the property is required to connect.
Category String The category of the connection property.
IsSessionProperty String Whether the property is a session property, used to save information about the current connection.
Sensitivity String The sensitivity level of the property. This informs whether the property is obfuscated in logging and authentication forms.
PropertyName String A camel-cased truncated form of the connection property name.
Ordinal Int32 The index of the parameter.
CatOrdinal Int32 The index of the parameter category.
Hierarchy String Shows dependent properties associated that need to be set alongside this one.
Visible Boolean Informs whether the property is visible in the connection UI.
ETC String Various miscellaneous information about the property.

sys_sqlinfo

Describes the SELECT query processing that the connector can offload to the data source.

Discovering the Data Source's SELECT Capabilities

Below is an example data set of SQL capabilities. Some aspects of SELECT functionality are returned in a comma-separated list if supported; otherwise, the column contains NO.

Name Description Possible Values
AGGREGATE_FUNCTIONS Supported aggregation functions. AVG, COUNT, MAX, MIN, SUM, DISTINCT
COUNT Whether COUNT function is supported. YES, NO
IDENTIFIER_QUOTE_OPEN_CHAR The opening character used to escape an identifier. [
IDENTIFIER_QUOTE_CLOSE_CHAR The closing character used to escape an identifier. ]
SUPPORTED_OPERATORS A list of supported SQL operators. =, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR
GROUP_BY Whether GROUP BY is supported, and, if so, the degree of support. NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE
STRING_FUNCTIONS Supported string functions. LENGTH, CHAR, LOCATE, REPLACE, SUBSTRING, RTRIM, LTRIM, RIGHT, LEFT, UCASE, SPACE, SOUNDEX, LCASE, CONCAT, ASCII, REPEAT, OCTET, BIT, POSITION, INSERT, TRIM, UPPER, REGEXP, LOWER, DIFFERENCE, CHARACTER, SUBSTR, STR, REVERSE, PLAN, UUIDTOSTR, TRANSLATE, TRAILING, TO, STUFF, STRTOUUID, STRING, SPLIT, SORTKEY, SIMILAR, REPLICATE, PATINDEX, LPAD, LEN, LEADING, KEY, INSTR, INSERTSTR, HTML, GRAPHICAL, CONVERT, COLLATION, CHARINDEX, BYTE
NUMERIC_FUNCTIONS Supported numeric functions. ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, COT, EXP, FLOOR, LOG, MOD, SIGN, SIN, SQRT, TAN, PI, RAND, DEGREES, LOG10, POWER, RADIANS, ROUND, TRUNCATE
TIMEDATE_FUNCTIONS Supported date/time functions. NOW, CURDATE, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, CURTIME, HOUR, MINUTE, SECOND, TIMESTAMPADD, TIMESTAMPDIFF, DAYNAME, MONTHNAME, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, EXTRACT
REPLICATION_SKIP_TABLES Indicates tables skipped during replication.
REPLICATION_TIMECHECK_COLUMNS A string array containing a list of columns which will be used to check for (in the given order) to use as a modified column during replication.
IDENTIFIER_PATTERN String value indicating what string is valid for an identifier.
SUPPORT_TRANSACTION Indicates if the provider supports transactions such as commit and rollback. YES, NO
DIALECT Indicates the SQL dialect to use.
KEY_PROPERTIES Indicates the properties which identify the uniform database.
SUPPORTS_MULTIPLE_SCHEMAS Indicates if multiple schemas may exist for the provider. YES, NO
SUPPORTS_MULTIPLE_CATALOGS Indicates if multiple catalogs may exist for the provider. YES, NO
DATASYNCVERSION The Data Sync version needed to access this driver. Standard, Starter, Professional, Enterprise
DATASYNCCATEGORY The Data Sync category of this driver. Source, Destination, Cloud Destination
SUPPORTSENHANCEDSQL Whether enhanced SQL functionality beyond what is offered by the API is supported. TRUE, FALSE
SUPPORTS_BATCH_OPERATIONS Whether batch operations are supported. YES, NO
SQL_CAP All supported SQL capabilities for this driver. SELECT, INSERT, DELETE, UPDATE, TRANSACTIONS, ORDERBY, OAUTH, ASSIGNEDID, LIMIT, LIKE, BULKINSERT, COUNT, BULKDELETE, BULKUPDATE, GROUPBY, HAVING, AGGS, OFFSET, REPLICATE, COUNTDISTINCT, JOINS, DROP, CREATE, DISTINCT, INNERJOINS, SUBQUERIES, ALTER, MULTIPLESCHEMAS, GROUPBYNORELATION, OUTERJOINS, UNIONALL, UNION, UPSERT, GETDELETED, CROSSJOINS, GROUPBYCOLLATE, MULTIPLECATS, FULLOUTERJOIN, MERGE, JSONEXTRACT, BULKUPSERT, SUM, SUBQUERIESFULL, MIN, MAX, JOINSFULL, XMLEXTRACT, AVG, MULTISTATEMENTS, FOREIGNKEYS, CASE, LEFTJOINS, COMMAJOINS, WITH, LITERALS, RENAME, NESTEDTABLES, EXECUTE, BATCH, BASIC, INDEX
PREFERRED_CACHE_OPTIONS A string value specifies the preferred cacheOptions.
ENABLE_EF_ADVANCED_QUERY Indicates if the driver directly supports advanced queries coming from Entity Framework. If not, queries will be handled client side. YES, NO
PSEUDO_COLUMNS A string array indicating the available pseudo columns.
MERGE_ALWAYS If the value is true, The Merge Mode is forcibly executed in Data Sync. TRUE, FALSE
REPLICATION_MIN_DATE_QUERY A select query to return the replicate start datetime.
REPLICATION_MIN_FUNCTION Allows a provider to specify the formula name to use for executing a server side min.
REPLICATION_START_DATE Allows a provider to specify a replicate startdate.
REPLICATION_MAX_DATE_QUERY A select query to return the replicate end datetime.
REPLICATION_MAX_FUNCTION Allows a provider to specify the formula name to use for executing a server side max.
IGNORE_INTERVALS_ON_INITIAL_REPLICATE A list of tables which will skip dividing the replicate into chunks on the initial replicate.
CHECKCACHE_USE_PARENTID Indicates whether the CheckCache statement should be done against the parent key column. TRUE, FALSE
CREATE_SCHEMA_PROCEDURES Indicates stored procedures that can be used for generating schema files.

The following query retrieves the operators that can be used in the WHERE clause:

SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'

Note that individual tables may have different limitations or requirements on the WHERE clause; refer to the Data Model section for more information.

Columns
Name Type Description
NAME String A component of SQL syntax, or a capability that can be processed on the server.
VALUE String Detail on the supported SQL or SQL syntax.

sys_identity

Returns information about attempted modifications.

The following query retrieves the Ids of the modified rows in a batch operation:

SELECT * FROM sys_identity
Columns
Name Type Description
Id String The database-generated ID returned from a data modification operation.
Batch String An identifier for the batch. 1 for a single operation.
Operation String The result of the operation in the batch: INSERTED, UPDATED, or DELETED.
Message String SUCCESS or an error message if the update in the batch failed.

sys_information

Describes the available system information.

The following query retrieves all columns:

SELECT * FROM sys_information
Columns
Name Type Description
Product String The name of the product.
Version String The version number of the product.
Datasource String The name of the datasource the product connects to.
NodeId String The unique identifier of the machine where the product is installed.
HelpURL String The URL to the product's help documentation.
License String The license information for the product. (If this information is not available, the field may be left blank or marked as 'N/A'.)
Location String The file path location where the product's library is stored.
Environment String The version of the environment or rumtine the product is currently running under.
DataSyncVersion String The tier of Sync required to use this connector.
DataSyncCategory String The category of Sync functionality (e.g., Source, Destination).

Advanced Configurations Properties

The advanced configurations properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure. Click the links for further details.

Authentication

Property Description
AccountId Identifier of the default advertising account. If left empty the driver will try to get the first account from the list returned by the Accounts view.

OAuth

Property Description
InitiateOAuth Specifies the process for obtaining or refreshing the OAuth access token, which maintains user access while an authenticated, authorized user is working.
OAuthClientId Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication.
OAuthClientSecret Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server.
OAuthAccessToken Specifies the OAuth access token used to authenticate requests to the data source. This token is issued by the authorization server after a successful OAuth exchange.
OAuthSettingsLocation Specifies the location of the settings file where OAuth values are saved. Storing OAuth settings in a central location avoids the need for users to enter OAuth connection properties manually each time they log in. It also enables credentials to be shared across connections or processes.
CallbackURL Identifies the URL users return to after authenticating to Snapchat Ads via OAuth. (Custom OAuth applications only.).
OAuthVerifier Specifies a verifier code returned from the OAuthAuthorizationURL. Used when authenticating to OAuth on a headless server, where a browser can't be launched. Requires both OAuthSettingsLocation and OAuthVerifier to be set.
OAuthRefreshToken Specifies the OAuth refresh token used to request a new access token after the original has expired.
OAuthExpiresIn Specifies the duration in seconds, of an OAuth Access Token's lifetime. The token can be reissued to keep access alive as long as the user keeps working.
OAuthTokenTimestamp Displays a Unix epoch timestamp in milliseconds that shows how long ago the current Access Token was created.

SSL

Property Description
SSLServerCert Specifies the certificate to be accepted from the server when connecting using TLS/SSL.

Schema

Property Description
Location Specifies the location of a directory containing schema files that define tables, views, and stored procedures. Depending on your service's requirements, this may be expressed as either an absolute path or a relative path.
BrowsableSchemas Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA, SchemaB, SchemaC.
Tables Optional setting that restricts the tables reported to a subset of all available tables. For example, Tables=TableA, TableB, TableC.
Views Optional setting that restricts the views reported to a subset of the available tables. For example, Views=ViewA, ViewB, ViewC.

Miscellaneous

Property Description
MaxRows Specifies the maximum rows returned for queries without aggregation or GROUP BY.
MaxThreads Specifies the number of concurrent requests.
Other Specifies additional hidden properties for specific use cases. These are not required for typical provider functionality. Use a semicolon-separated list to define multiple properties.
Pagesize The maximum number of records per page the provider returns when requesting data from Snapchat Ads.
PseudoColumns Specifies the pseudocolumns to expose as table columns. Use the format 'TableName=ColumnName;TableName=ColumnName'. The default is an empty string, which disables this property.
RetrieveSampleStats Whether to return sample (fake) stats or not.
Timeout Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. The default is 60 seconds. Set to 0 to disable the timeout.
UserDefinedViews Specifies a filepath to a JSON configuration file defining custom views. The provider automatically detects and uses the views specified in this file.

Authentication

This section provides a complete list of authentication properties you can configure.

Property Description
AccountId Identifier of the default advertising account. If left empty the driver will try to get the first account from the list returned by the Accounts view.

AccountId

Identifier of the default advertising account. If left empty the driver will try to get the first account from the list returned by the Accounts view.

Data Type

string

Default Value

""

Remarks

This ID is used to get analytic stats for the account that is identified by this Id. The Accounts view can be used to list available accounts with their specific Ids. If left empty the driver will try to get the first account from the list returned by the Accounts view.

OAuth

This section provides a complete list of OAuth properties you can configure.

Property Description
InitiateOAuth Specifies the process for obtaining or refreshing the OAuth access token, which maintains user access while an authenticated, authorized user is working.
OAuthClientId Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication.
OAuthClientSecret Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server.
OAuthAccessToken Specifies the OAuth access token used to authenticate requests to the data source. This token is issued by the authorization server after a successful OAuth exchange.
OAuthSettingsLocation Specifies the location of the settings file where OAuth values are saved. Storing OAuth settings in a central location avoids the need for users to enter OAuth connection properties manually each time they log in. It also enables credentials to be shared across connections or processes.
CallbackURL Identifies the URL users return to after authenticating to Snapchat Ads via OAuth. (Custom OAuth applications only.).
OAuthVerifier Specifies a verifier code returned from the OAuthAuthorizationURL. Used when authenticating to OAuth on a headless server, where a browser can't be launched. Requires both OAuthSettingsLocation and OAuthVerifier to be set.
OAuthRefreshToken Specifies the OAuth refresh token used to request a new access token after the original has expired.
OAuthExpiresIn Specifies the duration in seconds, of an OAuth Access Token's lifetime. The token can be reissued to keep access alive as long as the user keeps working.
OAuthTokenTimestamp Displays a Unix epoch timestamp in milliseconds that shows how long ago the current Access Token was created.

InitiateOAuth

Specifies the process for obtaining or refreshing the OAuth access token, which maintains user access while an authenticated, authorized user is working.

Possible Values

OFF, REFRESH, GETANDREFRESH

Data Type

string

Default Value

OFF

Remarks

OAuth is an authorization framework that enables applications to obtain limited access to user accounts on an HTTP service. The OAuth flow defines the method to be used for logging in users, exchanging their credentials for an OAuth access token to be used for authentication, and providing limited access to applications.

Snapchat Ads supports the following options for initiating OAuth access:

  1. OFF: No automatic OAuth flow initiation. The OAuth flow is handled entirely by the user, who will take action to obtain their OAuthAccessToken. Note that with this setting the user must refresh the token manually and reconnect with an updated OAuthAccessToken property when the current token expires.
  2. GETANDREFRESH: The OAuth flow is handled entirely by the connector. If a token already exists, it is refreshed when necessary. If no token currently exists, it will be obtained by prompting the user to login.
  3. REFRESH: The user handles obtaining the OAuth Access Token and sets up the sequence for refreshing the OAuth Access Token. (The user is never prompted to log in to authenticate. After the user logs in, the connector handles the refresh of the OAuth Access Token.

OAuthClientId

Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication.

Data Type

string

Default Value

""

Remarks

This property is required when using a custom OAuth application, such as in web-based authentication flows, service-based authentication, or certificate-based flows that require application registration. It is also required if an embedded OAuth application is not available for the driver. When an embedded OAuth application is available, this value may already be provided by the connector and not require manual entry.

This value is generally used alongside other OAuth-related properties such as OAuthClientSecret and OAuthSettingsLocation when configuring an authenticated connection.

OAuthClientId is one of the key connection parameters that need to be set before users can authenticate via OAuth. You can typically find this value in your identity provider’s application registration settings. Look for a field labeled Client ID, Application ID, or Consumer Key.

While the client ID is not considered a confidential value like a client secret, it is still part of your application's identity and should be handled carefully. Avoid exposing it in public repositories or shared configuration files.

OAuthClientSecret

Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server.

Data Type

string

Default Value

""

Remarks

This property is required when using a custom OAuth application in any flow that requires secure client authentication, such as web-based OAuth, service-based connections, or certificate-based authorization flows. It is not required when using an embedded OAuth application.

The client secret is used during the token exchange step of the OAuth flow, when the driver requests an access token from the authorization server. If this value is missing or incorrect, authentication will fail, and the server may return an invalid_client or unauthorized_client error.

OAuthClientSecret is one of the key connection parameters that need to be set before users can authenticate via OAuth. You can obtain this value from your identity provider when registering the OAuth application. It may be referred to as the client secret, application secret, or consumer secret.

This value should be stored securely and never exposed in public repositories, scripts, or unsecured environments. Client secrets may also expire after a set period. Be sure to monitor expiration dates and rotate secrets as needed to maintain uninterrupted access.

OAuthAccessToken

Specifies the OAuth access token used to authenticate requests to the data source. This token is issued by the authorization server after a successful OAuth exchange.

Data Type

string

Default Value

""

Remarks

The OAuthAccessToken is a temporary credential that authorizes access to protected resources. It is typically returned by the identity provider after the user or client application completes an OAuth authentication flow. This property is most commonly used in automated workflows or custom OAuth implementations where you want to manage token handling outside of the driver.

The OAuth access token has a server-dependent timeout, limiting user access. This is set using the OAuthExpiresIn property. However, it can be reissued between requests to keep access alive as long as the user keeps working.

If InitiateOAuth is set to REFRESH, we recommend that you also set both OAuthExpiresIn and OAuthTokenTimestamp. The connector uses these properties to determine when the token expires so it can refresh most efficiently. If OAuthExpiresIn and OAuthTokenTimestamp are not specified, the connector refreshes the token immediately.

Access tokens should be treated as sensitive credentials and stored securely. Avoid exposing them in logs, scripts, or configuration files that are not access-controlled.

OAuthSettingsLocation

Specifies the location of the settings file where OAuth values are saved. Storing OAuth settings in a central location avoids the need for users to enter OAuth connection properties manually each time they log in. It also enables credentials to be shared across connections or processes.

Data Type

string

Default Value

%APPDATA%\SnapchatAds Data Provider\OAuthSettings.txt

Remarks

You can store OAuth values in a central file for shared access to those values, in either of the following ways:

  • Set InitiateOAuth to either GETANDREFRESH or REFRESH and specify a filepath to the OAuth settings file.
  • Use memory storage to load the credentials into static memory.

The following sections provide more detail on each of these methods.

Specifying the OAuthSettingsLocation Filepath

The default OAuth setting location is %APPDATA%\SnapchatAds Data Provider\OAuthSettings.txt, with %APPDATA% set to the user's configuration directory.

Default values vary, depending on the user's operating system.

  • Windows (ODBC and Power BI): registry://%DSN%
  • Windows: %APPDATA%SnapchatAds Data Provider\OAuthSettings.txt
  • Mac: %APPDATA%//SnapchatAds Data Provider/OAuthSettings.txt
  • Linux: %APPDATA%//SnapchatAds Data Provider/OAuthSettings.txt
Loading Credentials Via Memory Storage

Memory locations are specified by using a value starting with memory://, followed by a unique identifier for that set of credentials (for example, memory://user1). The identifier can be anything you choose, but it should be unique to the user.

Unlike file-based storage, where credentials persist across connections, memory storage loads the credentials into static memory and the credentials are shared between connections using the same identifier for the life of the process. To persist credentials outside the current process, you must manually store the credentials prior to closing the connection. This enables you to set them in the connection when the process is started again.

To retrieve OAuth property values, query the sys_connection_props system table. If there are multiple connections using the same credentials, the properties are read from the previously closed connection.

Supported Storage Types

  • memory://: Stores OAuth tokens in-memory (unique identifier, shared within same process, etc.)
  • registry://: Only supported in the Windows ODBC and Power BI editions. Stores OAuth tokens in the registry under the DSN settings. Must end in a DSN name like registry://Snapchat Ads connector Data Source, or registry://%DSN%.
  • %DSN%: The name of the DSN you are connecting with.
  • Default (no prefix): Stores OAuth tokens within files. The value can be either an absolute path, or a path starting with %APPDATA% or %PROGRAMFILES%.

CallbackURL

Identifies the URL users return to after authenticating to Snapchat Ads via OAuth. (Custom OAuth applications only.).

Data Type

string

Default Value

""

Remarks

If you created a custom OAuth application, the OAuth authorization server redirects the user to this URL during the authentication process. This value must match the callback URL you specified when you Configured the custom OAuth application.

OAuthVerifier

Specifies a verifier code returned from the OAuthAuthorizationURL. Used when authenticating to OAuth on a headless server, where a browser can't be launched. Requires both OAuthSettingsLocation and OAuthVerifier to be set.

Data Type

string

Default Value

""

OAuthRefreshToken

Specifies the OAuth refresh token used to request a new access token after the original has expired.

Data Type

string

Default Value

""

Remarks

The refresh token is used to obtain a new access token when the current one expires. It enables seamless authentication for long-running or automated workflows without requiring the user to log in again. This property is especially important in headless, CI/CD, or server-based environments where interactive authentication is not possible.

The refresh token is typically obtained during the initial OAuth exchange by calling the GetOAuthAccessToken stored procedure. After that, it can be set using this property to enable automatic token refresh, or passed to the RefreshOAuthAccessToken stored procedure if you prefer to manage the refresh manually.

When InitiateOAuth is set to REFRESH, the driver uses this token to retrieve a new access token automatically. After the first refresh, the driver saves updated tokens in the location defined by OAuthSettingsLocation, and uses those values for subsequent connections.

The OAuthRefreshToken should be handled securely and stored in a trusted location. Like access tokens, refresh tokens can expire or be revoked depending on the identity provider’s policies.

OAuthExpiresIn

Specifies the duration in seconds, of an OAuth Access Token's lifetime. The token can be reissued to keep access alive as long as the user keeps working.

Data Type

string

Default Value

""

Remarks

The OAuth Access Token is assigned to an authenticated user, granting that user access to the network for a specified period of time. The access token is used in place of the user's login ID and password, which stay on the server.

An access token created by the server is only valid for a limited time. OAuthExpiresIn is the number of seconds the token is valid from when it was created. For example, a token generated at 2024-01-29 20:00:00 UTC that expires at 2024-01-29 21:00:00 UTC (an hour later) would have an OAuthExpiresIn value of 3600, no matter what the current time is.

To determine how long the user has before the Access Token will expire, use OAuthTokenTimestamp.

OAuthTokenTimestamp

Displays a Unix epoch timestamp in milliseconds that shows how long ago the current Access Token was created.

Data Type

string

Default Value

""

Remarks

The OAuth Access Token is assigned to an authenticated user, granting that user access to the network for a specified period of time. The access token is used in place of the user's login ID and password, which stay on the server.

An access token created by the server is only valid for a limited time. OAuthTokenTimestamp is the Unix timestamp when the server created the token. For example, OAuthTokenTimestamp=1706558400 indicates the OAuthAccessToken was generated by the server at 2024-01-29 20:00:00 UTC.

SSL

This section provides a complete list of SSL properties you can configure.

Property Description
SSLServerCert Specifies the certificate to be accepted from the server when connecting using TLS/SSL.

SSLServerCert

Specifies the certificate to be accepted from the server when connecting using TLS/SSL.

Data Type

string

Default Value

""

Remarks

If using a TLS/SSL connection, this property can be used to specify the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected.

This property can take the following forms:

Description Example
A full PEM Certificate (example shortened for brevity) -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE-----
A path to a local file containing the certificate C:\\cert.cer
The public key (example shortened for brevity) -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY-----
The MD5 Thumbprint (hex values can also be either space or colon separated) ecadbdda5a1529c58a1e9e09828d70e4
The SHA1 Thumbprint (hex values can also be either space or colon separated) 34a929226ae0819f2ec14b4a3d904f801cbb150d

If not specified, any certificate trusted by the machine is accepted.

Certificates are validated as trusted by the machine based on the System's trust store. The trust store used is the 'javax.net.ssl.trustStore' value specified for the system. If no value is specified for this property, Java's default trust store is used (for example, JAVA_HOME\lib\security\cacerts).

Use '*' to signify to accept all certificates. Note that this is not recommended due to security concerns.

Schema

This section provides a complete list of schema properties you can configure.

Property Description
Location Specifies the location of a directory containing schema files that define tables, views, and stored procedures. Depending on your service's requirements, this may be expressed as either an absolute path or a relative path.
BrowsableSchemas Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA, SchemaB, SchemaC.
Tables Optional setting that restricts the tables reported to a subset of all available tables. For example, Tables=TableA, TableB, TableC.
Views Optional setting that restricts the views reported to a subset of the available tables. For example, Views=ViewA, ViewB, ViewC.

Location

Specifies the location of a directory containing schema files that define tables, views, and stored procedures. Depending on your service's requirements, this may be expressed as either an absolute path or a relative path.

Data Type

string

Default Value

%APPDATA%\SnapchatAds Data Provider\Schema

Remarks

The Location property is only needed if you want to either customize definitions (for example, change a column name, ignore a column, etc.) or extend the data model with new tables, views, or stored procedures.

If left unspecified, the default location is %APPDATA%\SnapchatAds Data Provider\Schema, where %APPDATA% is set to the user's configuration directory:

Platform %APPDATA%
Windows The value of the APPDATA environment variable
Mac ~/Library/Application Support
Linux ~/.config

BrowsableSchemas

Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.

Data Type

string

Default Value

""

Remarks

Listing all available database schemas can take extra time, thus degrading performance. Providing a list of schemas in the connection string saves time and improves performance.

Tables

Optional setting that restricts the tables reported to a subset of all available tables. For example, Tables=TableA,TableB,TableC.

Data Type

string

Default Value

""

Remarks

Listing all available tables from some databases can take extra time, thus degrading performance. Providing a list of tables in the connection string saves time and improves performance.

If there are lots of tables available and you already know which ones you want to work with, you can use this property to restrict your viewing to only those tables. To do this, specify the tables you want in a comma-separated list. Each table should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Tables=TableA,[TableB/WithSlash],WithCatalog.WithSchema.`TableC With Space`.

Note

If you are connecting to a data source with multiple schemas or catalogs, you must specify each table you want to view by its fully qualified name. This avoids ambiguity between tables that may exist in multiple catalogs or schemas.

Views

Optional setting that restricts the views reported to a subset of the available tables. For example, Views=ViewA,ViewB,ViewC.

Data Type

string

Default Value

""

Remarks

Listing all available views from some databases can take extra time, thus degrading performance. Providing a list of views in the connection string saves time and improves performance.

If there are lots of views available and you already know which ones you want to work with, you can use this property to restrict your viewing to only those views. To do this, specify the views you want in a comma-separated list. Each view should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Views=ViewA,[ViewB/WithSlash],WithCatalog.WithSchema.`ViewC With Space`.

Note

If you are connecting to a data source with multiple schemas or catalogs, you must specify each view you want to examine by its fully qualified name. This avoids ambiguity between views that may exist in multiple catalogs or schemas.

Miscellaneous

This section provides a complete list of miscellaneous properties you can configure.

Property Description
MaxRows Specifies the maximum rows returned for queries without aggregation or GROUP BY.
MaxThreads Specifies the number of concurrent requests.
Other Specifies additional hidden properties for specific use cases. These are not required for typical provider functionality. Use a semicolon-separated list to define multiple properties.
Pagesize The maximum number of records per page the provider returns when requesting data from Snapchat Ads.
PseudoColumns Specifies the pseudocolumns to expose as table columns. Use the format 'TableName=ColumnName;TableName=ColumnName'. The default is an empty string, which disables this property.
RetrieveSampleStats Whether to return sample (fake) stats or not.
Timeout Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. The default is 60 seconds. Set to 0 to disable the timeout.
UserDefinedViews Specifies a filepath to a JSON configuration file defining custom views. The provider automatically detects and uses the views specified in this file.

MaxRows

Specifies the maximum rows returned for queries without aggregation or GROUP BY.

Data Type

int

Default Value

-1

Remarks

This property sets an upper limit on the number of rows the connector returns for queries that do not include aggregation or GROUP BY clauses. This limit ensures that queries do not return excessively large result sets by default.

When a query includes a LIMIT clause, the value specified in the query takes precedence over the MaxRows setting. If MaxRows is set to "-1", no row limit is enforced unless a LIMIT clause is explicitly included in the query.

This property is useful for optimizing performance and preventing excessive resource consumption when executing queries that could otherwise return very large datasets.

MaxThreads

Specifies the number of concurrent requests.

Data Type

string

Default Value

20

Remarks

This property allows you to issue multiple requests simultaneously, thereby improving performance.

The Snapchat Ads API has a rate limit of 10000 requests per minute for Snapchat Ads Professional plans and 25000 per minute for the Snapchat Ads Premium plans.

Because of the Snapchat Ads API limits, the connector is restricted to making an http request for each row in order to collect as much data as possible.

To improve the performance of the connector consider increasing this value based on the machine's resources.

Other

Specifies additional hidden properties for specific use cases. These are not required for typical provider functionality. Use a semicolon-separated list to define multiple properties.

Data Type

string

Default Value

""

Remarks

This property allows advanced users to configure hidden properties for specialized scenarios. These settings are not required for normal use cases but can address unique requirements or provide additional functionality. Multiple properties can be defined in a semicolon-separated list.

Note

It is strongly recommended to set these properties only when advised by the support team to address specific scenarios or issues.

Specify multiple properties in a semicolon-separated list.

Integration and Formatting
Property Description
DefaultColumnSize Sets the default length of string fields when the data source does not provide column length in the metadata. The default value is 2000.
ConvertDateTimeToGMT=True Converts date-time values to GMT, instead of the local time of the machine. The default value is False (use local time).
RecordToFile=filename Records the underlying socket data transfer to the specified file.

Pagesize

The maximum number of records per page the provider returns when requesting data from Snapchat Ads.

Data Type

int

Default Value

1000

Remarks

When processing a query, instead of requesting all of the queried data at once from Snapchat Ads, the connector can request the queried data in pieces called pages.

This connection property determines the maximum number of results that the connector requests per page.

Note that setting large page sizes may improve overall query execution time, but doing so causes the connector to use more memory when executing queries and risks triggering a timeout.

PseudoColumns

Specifies the pseudocolumns to expose as table columns. Use the format 'TableName=ColumnName;TableName=ColumnName'. The default is an empty string, which disables this property.

Data Type

string

Default Value

""

Remarks

This property allows you to define which pseudocolumns the connector exposes as table columns.

To specify individual pseudocolumns, use the following format: "Table1=Column1;Table1=Column2;Table2=Column3"

To include all pseudocolumns for all tables use: "*=*"

RetrieveSampleStats

Whether to return sample (fake) stats or not.

Data Type

bool

Default Value

false

Remarks

Set to false to exclude sample stats.

Timeout

Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. The default is 60 seconds. Set to 0 to disable the timeout.

Data Type

int

Default Value

60

Remarks

This property controls the maximum time, in seconds, that the connector waits for an operation to complete before canceling it. If the timeout period expires before the operation finishes, the connector cancels the operation and throws an exception.

The timeout applies to each individual communication with the server rather than the entire query or operation. For example, a query could continue running beyond the timeout value if each paging call completes within the timeout limit.

Setting this property to 0 disables the timeout, allowing operations to run indefinitely until they succeed or fail due to other conditions such as server-side timeouts, network interruptions, or resource limits on the server. Use this property cautiously to avoid long-running operations that could degrade performance or result in unresponsive behavior.

UserDefinedViews

Specifies a filepath to a JSON configuration file defining custom views. The provider automatically detects and uses the views specified in this file.

Data Type

string

Default Value

""

Remarks

This property allows you to define and manage custom views through a JSON-formatted configuration file called UserDefinedViews.json. These views are automatically recognized by the connector and enable you to execute custom SQL queries as if they were standard database views. The JSON file defines each view as a root element with a child element called "query", which contains the SQL query for the view. For example:

{
    "MyView": {
        "query": "SELECT * FROM Campaigns WHERE MyColumn = 'value'"
    },
    "MyView2": {
        "query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)"
    }

}

You can define multiple views in a single file and specify the filepath using this property. For example: UserDefinedViews=C:\Path\To\UserDefinedViews.json. When you use this property, only the specified views are seen by the connector.

Refer to User Defined Views for more information.