Get started with a free trial today
Already have an account? Sign in
Stitch’s Campaign Manager integration replicates data using theCampaign Manager 360 API. Refer to theSchema section for a list of objects available for replication.
A high-level look at Stitch's Campaign Manager (v1) integration, including release status, useful links, and the features supported in Stitch.
| STITCH | |||
| Release status | Released on August 17, 2018 | Supported by | |
| Stitch plan | Standard | API availability | Available |
| Singer GitHub repository | |||
| REPLICATION SETTINGS | |||
| Anchor Scheduling | Supported | Advanced Scheduling | Unsupported |
| Table-level reset | Unsupported | Configurable Replication Methods | Unsupported |
| DATA SELECTION | |||
| Table selection | Supported | Column selection | Unsupported |
| Select all | Supported | ||
| TRANSPARENCY | |||
| Extraction Logs | Supported | Loading Reports | Supported |
To set up Campaign Manager in Stitch, you need:
A Campaign Manager account. Refer toGoogle’s website for signup information.
API access. Most accounts have this enabled by default. If you’re not sure, contact your representative or the support team.
Access to the reports you want to replicate. Stitch will only be able to replicate the reports that the user who authorizes the integration has access to.
Before you connect Campaign Manager to Stitch, you should verify that you have access to the reports you want to replicate. Stitch will only be able to replicate data for the same reports that you have access to in Campaign Manager.
A list of all the reports you have access to will display:


Locate the ID of the profile you want to connect. This will be a seven digit number next to the name of the profile. For example:9999999
An example is highlighted in the image to the right.
Keep this handy - you’ll need it in the next step.
On the Stitch Dashboard page, click theAdd Integration button.
Click theCampaign Manager icon.
Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.
For example, the name “Stitch Campaign Manager” would create a schema calledstitch_campaign_manager in the destination.Note: Schema names cannot be changed after you save the integration.
9999999.In theReplication Frequency section, you’ll create the integration’sreplication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.
Campaign Manager integrations support the following replication scheduling methods:
To keep your row usage low, consider setting the integration to replicate less frequently. See theUnderstanding and Reducing Your Row Usage guide for tips on reducing your usage.
The last step is to select the tables you want to replicate.Learn about the available tables for this integration.
Note: If a replication job is currently in progress, new selections won’t be used until the next job starts.
For Campaign Manager integrations, you can select:
**Individual tables **
All tables and columns
Click the tabs to view instructions for each selection method.
To track a table, click thecheckbox next to the table’s name. A blue checkmark means the table is set to replicate.
Click theTables to Replicate tab.
In the menu that displays, clickTrack all Tables and Fields:

After you finish setting up Campaign Manager, itsSync Status may show asPending on either the Stitch Dashboard or in the Integration Details page.
For a new integration, aPending status indicates that Stitch is in the process of scheduling the initial replication job for the integration.This may take some time to complete.
Initial replication jobs with Anchor Scheduling
If using Anchor Scheduling, an initial replication job may not kick off immediately. This depends on the selected Replication Frequency and Anchor Time. Refer to theAnchor Scheduling documentation for more information.
The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.
When Stitch replicates data from Campaign Manager, the process will look like this:
Each run of a report will have its own CSV file in Campaign Manager, which you can access bysigning into your Campaign Manager account.
When Stitch replicates data for a given report, it will use the date range currently defined in Campaign Manager for that report.
For example: The image below shows the configuration for a report namedad_performance_report, where the date range is set to the last 30 days. When Stitch replicates data for this report, it will run the report using these settings:

When Stitch loads the extracted data into your destination, it will do so using Append-Only Replication. This is a type of Incremental Replication where existing rows aren’t updated, but appended to the end of the table.
Additionally, the number of rows loaded into the table during each replication job is dependent on the combination of unique values in the dimension columns you track. See theColumn Selection and Statistic Aggregation section for more info and examples.
Let’s say these columns are tracking in thead_performance_report table:
date (dimension) - The date pertaining to the record.
campaignId (dimension) - This is the ID associated with a campaign. In this example, there are two campaigns:929007494 and929599581device (dimension) - The device type. There are two values for this example:Computer andTabletimpressions (metric) - The total number of impressions.Every time Stitch replicates and loads data, a row for each unique combination of the dimension columns will be appended to the end of the table:
| _sdc_report_datetime | date | campaignId | device | impressions | |
|---|---|---|---|---|---|
| 2017-10-01 17:48:26.791 | 2017-09-10 00:00:00 | 929007494 | Computer | 61 | |
| 2017-10-01 17:48:26.791 | 2017-09-10 00:00:00 | 929007494 | Tablet | 15 | |
| 2017-10-01 17:48:26.791 | 2017-09-10 00:00:00 | 929599581 | Computer | 37 | |
| 2017-10-01 17:48:26.791 | 2017-09-10 00:00:00 | 929599581 | Tablet | 9 |
You may need to alter this query
The query below is meant to act as a foundation for writing your own. Depending on your SQL syntax and the dimensions contained in a given table, you may need to alter this query for your own usage.
When querying your Campaign Manager data, you’ll want to include the Dimensions you’re analyzing in the partition. For example: If you’re analyzing campaigns over time, you’d include columns likecampaignId anddate.
If you want only the most recently replicated data for any Campaign Manager table, you can use the sample query below to account for the Append-Only Replication Stitch uses.
This query will use the report’s Dimensions and the_sdc_report_datetime column to return the latest data:
SELECT*FROM(SELECT*,RANK()OVER(PARTITIONBYdimension_1,dimension_2,etc.,ORDERBY_sdc_report_datetimeDESC)FROMad_performance_reportORDERBYdimension_1,dimension_2,etc.ASC)ASlatestWHERElatest.rank=1In this query:
_sdc_report_datetime column are ranked within each window partition, and_sdc_report_datetime values ranked as1 - which is equal to the maximum timestamp - are returned.Schemas and versioning
Schemas and naming conventions can change from version to version, so we recommend verifying your integration’s version before continuing.
The schema and info displayed below is forversion 1 of this integration.
This is the latest version of the Campaign Manager integration.
Table and column names in your destination
Depending on your destination, table and column names may not appear as they are outlined below.
For example: Object names are lowercased in Redshift (CusTomERs >customers), while case is maintained in PostgreSQL destinations (CusTomERs >CusTomERs). Refer to theLoading Guide for your destination for more info.
| Related | Troubleshooting |
Did this article help? If you have questions or feedback, feel free tosubmit a pull request with your suggestions,open an issue on GitHub, orreach out to us.