> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LinkedIn Ads

> Run campaigns with custom audiences, retargeting, and lookalikes in LinkedIn

## Overview

Deliver even more relevant ads by combining data from various sources within your
data warehouse to build custom audiences for LinkedIn Ads. By keeping your
custom audiences updated automatically, you can avoid showing irrelevant ads.

## Supported syncing

| Sync type | Description | Supported sync modes | API reference |
| - | - | - | - |
| [**Audiences**](#syncing-audiences) | Create new audience to sync users or companies | Upsert | [Audiences docs](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/matched-audiences/matched-audiences?view=li-lms-2023-11) |
| [**Conversions**](#syncing-conversions) | Sync data from any source to LinkedIn conversions | Insert | [Conversions docs](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/conversions-api?view=li-lms-2023-11\&tabs=http) |

For more information about sync modes, refer to the [sync modes](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) docs.

## Connect to LinkedIn Ads

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs)
and click the **Add destination** button. Select **LinkedIn Ads** and click **Continue**.
You can then authenticate Hightouch to **LinkedIn Ads** using OAuth.

### Authenticate with OAuth

For the **Authentication method**, select **Log in to LinkedIn Ads** and log into
your LinkedIn Ads account.

Once successful, you will be redirected back to Hightouch to enter a descriptive name
for your destination and complete setup.

## Sync configuration

Once you've set up your LinkedIn Ads destination and have a
[model](https://docs.hightouch.com/getting-started/concepts.md#models) to pull data from,
you can set up your sync configuration to begin syncing data. Go to the
[**Syncs** overview page](https://app.hightouch.com/syncs?from=docs) and click the
**Add sync** button to begin. Then, select the relevant model and the LinkedIn
Ads destination you want to sync to.

### Syncing audiences

To get started, select an ad account to sync your data to, then select
which audience object you want to sync data to: Company or User.

Hightouch supports automatically creating a new audience for your sync. You can
specify a custom name for this audience, or Hightouch will use the name of the
model.

> [!WARNING]
>
> After the initial run of the sync, you can't update the ad account, audience
> object, or name of the audience. To make these changes, create a new sync.

#### Sync mode

This integration supports Upsert mode. New users will be inserted into the LinkedIn
audience. Users that are removed from the model will be removed from the
audience.

#### Field mapping

The sync configuration has two field mapping sections:

* **ID fields**: These are the primary identity keys that LinkedIn uses to match users, such as hashed email or Google Advertising ID (GAID). These values become `userIds` in the LinkedIn API payload. You must map at least one ID field.
* **Additional fields**: These are supplemental fields—such as first name, last name, title, company, and country—that improve LinkedIn's match rate but aren't primary identifiers.

LinkedIn requires emails to be hashed using SHA256 or SHA512. Hightouch handles this automatically on the backend.

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-linkedin-field-mappings.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=5697d3b2ceecfe9fdf2a8a49fd636b69)

> [!NOTE]
>
> If you map an identifier field that contains an array of values, Hightouch automatically fans out each element into a separate record when syncing to LinkedIn. Learn more about [array identifier fan-out](https://docs.hightouch.com/syncs/array-identifier-fan-out.md).

> [!WARNING]
>
> LinkedIn enforces the following input data requirements: - All IDs provided by
> `userId` or `userIds` fields must have a [supported type and valid
> value](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/matched-audiences/create-and-manage-segment-users?view=li-lms-unversioned\&tabs=http#input-data-requirements).
>
> * Each row of data must provide: (1) at least one valid ID; or (2) A valid
>   `firstName` and `lastName`. See LinkedIn's [user data
>   schema](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/matched-audiences/create-and-manage-segment-users?view=li-lms-unversioned\&tabs=http#schema)
>   for more information.

### Syncing conversions

Sync data from any source to LinkedIn as conversion events.

> [!WARNING]
>
> To ensure syncs send each event, your event model must use a truly unique [primary key](https://docs.hightouch.com/getting-started/concepts.md#unique-primary-key-requirement). See the [events syncs](https://docs.hightouch.com/syncs/types-and-modes.md#event-syncs) documentation for more information.

Create a [conversion rule](https://www.linkedin.com/help/lms/answer/a1657171) in LinkedIn Campaign Manager.

Select "Conversions" in your sync in Hightouch.

![LinkedIn Conversions sync](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-linkedin-conversions-type.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=06f6811bb62694e866cb8ce8ce60b361)

Select your LinkedIn account.

![LinkedIn Conversions account](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-linkedin-conversions-account-select.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=de7484a7a7c5c4fdf4462bc4f0dfbb9b)

Choose your event timestamp or let LinkedIn use the timestamp the event arrives at the server.

![LinkedIn Conversions event timestamp](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-linkedin-conversions-timestamp.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=62e11b8a3f93b7a0da570f6cf8455f88)

#### Record matching

You can match rows from your model to conversions in LinkedIn on the following user fields:

* Email (SHA256)
* LinkedIn tracking UUID
* Acxiom ID
* Oracle moat ID
* IP address (IPv4)
* Google Advertising ID (GAID)

## Handling PII and hashing

You can enable PII hashing if you want Hightouch to automatically detect, normalize, and hash fields that require it. For example, if you map to a `Email (SHA256)` field and the model column with the email data is unhashed, Hightouch hashes the value for you.

By default, Hightouch automatically detects if the following fields require hashing:

* **Email (SHA256)**
* **Email (SHA512)**

#### View conversion tracking and reporting metrics

Once your sync is set up and published, you can view conversions tracking and reporting metrics in your LinkedIn Campaign Manager.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).

> [!NOTE]
>
> For Hightouch platform error codes related to LinkedIn, see [Error codes: LinkedIn](https://docs.hightouch.com/developer-tools/error-codes.md#linkedin).

### Matched users count

Below only applies to the audiences sync type.

Hightouch retrieves the audience metadata from LinkedIn Ads in real-time. The matched number displayed in Hightouch should reflect what you see in LinkedIn Ads. Note that the matched numbers are approximated to maintain privacy thresholds. Hightouch takes the matched count to calculate a match rate for your sync, where applicable. The calculation breakdown:

`matched_user_count / # of rows queried in the latest sync run`

The match rate is **not** calculated when:

* syncing to an existing segment because the total number of records to ever be uploaded to the segment is unknown
* removed users from your model is not removed in LinkedIn Ads because the matched user count would be inflated in the calculation

Common causes for low match rates:

* Your audience model is too small. Most ad platforms do not display the matched number unless there's at least one thousand matched users to maintain privacy thresholds.
* The upload is still processing. We recommend waiting at least **72 hours** from the first sync run for numbers to settle.
* Your data isn’t cleaned or hashed properly. Hightouch normalizes and hashes your data according to destination requirements, but it’s still good to make sure that the data is as clean as possible. Note that Hightouch cannot clean your data if you opt to hash it yourself. In that case, ensure you follow the data cleaning requirements for LinkedIn Ads.

## Common errors

### 400 - MISSING\_REQUIRED\_FIELD

You may receive a `400 - type=MISSING_REQUIRED_FIELD` because the sync is sending a required field `null` values.

You can resolve this error by either:

* [Removing rows containing `null` values](https://docs.hightouch.com/models/sql-editor#exclude-rows-with-null-values) from your model's query results
* Replacing any `null` values in your model's query results with another value
* Using the [advanced mapper](https://docs.hightouch.com/syncs/mapping-data.md#advanced-mapper) to [ignore any `null` values](https://docs.hightouch.com/syncs/mapping-data#dont-sync-null-values)

![Column Mapping with ignore null option enabled](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/mapping-data/mapping-data-column-mapping-ignore-null.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=13475c5aacbc695bf318c2ca8295dcb3)
