Hightouch helps marketers activate their customer data from Snowflake to over 125 different applications. The Data Activation platform, powered by Reverse ETL, provides both a SQL-based UI as well as a no-code audience builder to help teams across an organization complete what is now being called the "last mile" of the Modern Data Stack.

Snowflake and Hightouch stack

Performance marketing and data teams leverage Hightouch to integrate Snowflake with Facebook's Conversions API (CAPI). CAPI provides a reliable solution for tracking and sharing customer interactions with Facebook, overcoming the challenges posed by ad blockers, cookie restrictions, and evolving privacy policies.

Rather than relying on the Facebook pixel, with Hightouch, you can send events directly from Snowflake to Facebook CAPI. Doing so allows you to enrich your conversion events with your rich first-party data in Snowflake to send better signals that unlock better audience targeting, attribution reporting, and campaign optimization.

Check out this webinar to learn more about the importance of server-side conversion signals.


What You'll Learn

What You'll Build

Imagine you're a retailer using Facebook ads to drive traffic to your online and brick-and-mortar stores. You currently rely on the Facebook pixel to track user behaviors like page views, add to cart, and purchase events. However, recent changes in iOS tracking and the prevalence of ad-blockers are causing the pixel to miss conversions. Additionally, the Facebook pixel doesn't account for in-store purchases, which drive a significant portion of your sales.

To address these challenges, you can leverage Hightouch to send conversion events enriched with first-party data from Snowflake to Facebook's Conversion API, improving the accuracy and effectiveness of your campaigns.

Hightouch CAPI architecture

In this Quickstart, we will cover sending conversion events to Facebook. Leveraging our event data in Snowflake, in addition to propensity models and first-party data, we will, in just a few minutes, setup automated and observable pipelines that can be replicated across to other paid media platforms.

First, you need to have the data that you want to push prepared within Snowflake.

Log in to Snowflake

If you already have a Snowflake account, you can use your credentials to log in. If you do not already have an account, you can visit [https://signup.snowflake.com/]https://signup.snowflake.com/ to sign up for a 30-day free trial. You will want to make sure that the account you use in Snowflake has the permissions to create a new database, schema, and warehouse to be used by Hightouch.

Set-up Hightouch through Partner Connect

You can set up a database, schema, and warehouse for use with Hightouch by setting up Hightouch through Partner Connect in Snowsight. See the [https://hightouch.com/blog/hightouch-snowflake-partner-connect](detailed instructions) on the Hightouch Blog for more details.

  1. Click the Partner Connect tab under Admin.

Partner Connect

  1. Search for Hightouch (or scroll to the Data Integration section), and select it.

Select Hightouch

  1. View the Database, Warehouse, User, and Role that will be created for the integration, and click Launch.

Click Launch

  1. When the creation is complete, you will see a pop-up telling you that the creation has finished. Click Activate to be taken to Hightouch to log in.

Click Activate

  1. Log in to Hightouch using your Hightouch credentials, and you will have a Data Source from Snowflake created in Hightouch.

Next, we will connect Hightouch to Facebook to allow it to push data from Snowflake to Facebok.

Creating a Facebook destination

To push data to Facebook for CAPI, we need to create a destination.

  1. Navigate to destinations and click Add Destination.

Add destination

  1. Search for Facebook Conversions, select it, and click Continue.

Search for Facebook Conversions

  1. Connect to Facebook with 0Auth. This will open up a new window to input your credentials. Once done, click Continue.

Connect with OAuth

  1. Enter your access token and pixel ID (more info here) and then click Continue.

Enter access token

  1. Name the destination (ex. Facebook CAPI Destination) and then click Finish.

Name the destination

Choose the data to sync to Facebook

Next, you want to create and define your data model. You can define your data using either a SQL editor, table selector, or your existing dbt models. For this scenario, we'll be using the SQL Editor.

  1. Navigate to models in Hightouch and click Add model.

Add model

  1. Select the Snowflake data source you connected earlier and click Continue.

Select data source

  1. Select the SQL Editor.

SQL Editor

  1. Input a query that joins your events table onto your customer table.
FROM public.events e
LEFT JOIN public.customer c ON e.customer_id = c.customer_id

Note: each row should be a unique event with a unique event ID and timestamp (within the last 7 days). You can additionally include any of the server event parameters or custom data parameters below. The more customer information you're able to provide, the higher the likelihood that Facebook will match events to the correct user profiles.

  1. Click Preview to verify your model output looks good, then hit Continue.

Preview model

  1. Then name your model, select your primary key, and click Finish.

Name model

Setup your sync from Snowflake to Facebook

With the model created, it's time to create your sync to Facebook.

  1. Navigate to Syncs from the model you just created.

Click Syncs

  1. Click Add a sync
  2. Select your Facebook CAPI destination and click Continue.

Select destination

  1. Select the Facebook CAPI account that you set up and choose which columns you want to sync to Facebook.

Map columns

  1. If you're dealing with PII data you can configure Hightouch automatically hash your data.

Hash PII

  1. After you've mapped your columns, you can set your sync schedule. You have several choices on how to schedule the sync with Facebook. For example, it could happen on a set interval or with a CRON expression.

Set sync schedule

  1. With your sync configured, simply click Run and your audience will begin syncing to Facebook. By sending these enriched events with first-party data, Facebook will now be able to match your events to user profiles more effectively.

Run sync

By implementing Facebook Conversions API (CAPI) with Snowflake and Hightouch, you can in just a matter of minutes setup a flexible and observable solution to routing conversion events to any paid media platform. This integration will enable you to harness the full power of Facebook's advertising platform and improve the effectiveness of your campaigns.

What we've covered

Additional resources