# LinkedIn Ads

## Pipeline Concepts

Before setting up the pipeline, learn about pipeline concepts [here](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines)

## Step by Step Guide

### STEP-1: Configure Connection

To learn about Connection, refer [here](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines)

* Log into Sprinkle application
* Navigate to Ingst -> Connections Tab -> New Connection ->&#x20;
* Select LinkedIn Ads&#x20;
* Provide all the mandatory details
  * *Name*: Name to identify this connection
* Connect to LinkedIn
* Test Connection&#x20;
* Create

### STEP-2: Configure Datasource

To learn about pipeline, refer [here](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines)

* Navigate to Ingest -> Pipeline Tab -> Add ->&#x20;
* Select LinkedIn Ads
* Provide the name -> Create
* **Connection Tab**:&#x20;
  * From the drop-down, select the name of connection created in STEP-2
  * Update

### STEP-3: Create Dataset

**Datasets Tab**: To learn about Dataset, refer [here](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines). Add Dataset for each report/dataset that you want to integrate, providing following details

* *Report Type* (Required) : Select the API through which you want the result. Read more from LinkedIn api [docs](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/marketing-integrations-overview). Select report type from any one of the following:
  * *Accounts*
  * *Account\_Users*
    * *AdAccount Id*: Select from the drop-down
  * *Campaign\_Groups*
    * *AdAccount Id*: Select from the drop-down
  * *Campaigns*
    * *AdAccount Id*: Select from the drop-down
  * *SponsoredUpdateCreativeVariables*
    * *AdAccount Id*: Select from the drop-down
  * *Creatives*
    * *AdAccount Id*: Select from the drop-down
  * *Conversions*
    * *AdAccount Id*: Select from the drop-down
  * *AD\_Segments\_By\_Account*
    * *AdAccount Id*: Select from the drop-down
  * *AD\_Targeting\_Facets*
  * *AD\_Forms*
    * *AdAccount Id*: Select from the drop-down
  * *AD\_Analytics*
    * *AdAccount Id*: Select from the drop-down
    * *Pivot Values*: Pivot of results, by which each report data point is grouped. See about Pivot [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting?tabs=http#analytics-finder). Select from the drop-down.
    * *Metrics*: Max. 20 metrics can be selected at a time. See about metrics [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting?tabs=http#metrics-available).
    * *Start Date*: Start Date from which you want to fetch data. Give Start Date in Format yyyy-mm-dd
    * *Ingestion Mode*:
      * *Complete*: Will download full data in every ingestion from the start date.
        * *Time Granularity*: Results grouped by the selected value of Time Granularity. See about Time Granularity in Query Parameters [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting?tabs=http#query-parameters). Select from ALL, MONTHLY, YEARLY.
      * *Incremental*: Will download updated rows in the table, based on start date value in first run and checkpoint value in each run. Having Time Granularity set as DAILY
        * *Window for Backfill*: Mention window for backfill, for backfilling metrics in every run to include updates from attribution window. Can take values 1, 7 and 28.
* Flatten Level(Required) : Select One Level or Multi Level. In one level, flattening will not be applied on complex type. They will be stored as string. In multi level, flattening will be applied in complex level till they become simple type.
* *Destination Schema* (Required) : Data warehouse schema where the table will be ingested into
* *Destination Table name* (Required) : It is the table name to be created on the warehouse. If not given, sprinkle will create like ds\_\<pipelinename>\_\<tablename>
* *Destination Create Table Clause*: Provide additional clauses to warehouse-create table queries such as clustering, partitioning, and more, useful for optimizing DML statements. [Learn more](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines/databases/features/destination-create-table-clause) on how to use this field.
* Create

### STEP-4: Run and schedule Ingestion

In the **Ingestion Jobs** ta&#x62;**:**

* Trigger the Job, using the Run button
* To schedule, enable Auto-Run. Change the frequency if needed

## **Dataset Fields**

<details>

<summary>Account</summary>

* id
* reference\_id
* currency
* name
* notified\_on\_campaign\_optimization
* notified\_on\_creative\_approval
* notified\_on\_creative\_rejection
* notified\_on\_end\_of\_campaign
* notified\_on\_new\_features\_enabled
* type
* status
* test
* version\_tag

</details>

<details>

<summary>Account_User</summary>

* user\_id
* account\_id
* role
* campaign\_contact
* created\_time
* last\_modified\_at

</details>

<details>

<summary>AD_Analytics_By_Campaign</summary>

* campaign\_id
* date
* clicks
* impressions
* cost\_in\_usd
* cost\_in\_local\_currency
* conversion\_value\_in\_local\_currency
* approximate\_unique\_impressions
* follows
* likes
* comments
* reaction
* sends
* shares
* total\_engagements
* text\_url\_clicks
* video\_views
* video\_completions
* landing\_page\_clicks
* company\_page\_clicks
* viral\_\*
* video\_\*

</details>

<details>

<summary>AD_Analytics_By_Creative</summary>

* creative\_id
* date
* clicks
* impressions
* cost\_in\_usd
* cost\_in\_local\_currency
* conversion\_value\_in\_local\_currency
* approximate\_unique\_impressions
* follows
* likes
* comments
* reaction
* sends
* shares
* total\_engagements
* video\_views
* video\_completions
* landing\_page\_clicks
* company\_page\_clicks
* viral\_\*
* video\_\*

</details>

<details>

<summary>Campaign</summary>

* id
* account\_id
* campaign\_group
* associated\_entity
* audience\_expansion\_enabled
* cost\_type
* creative\_selection
* daily\_budget\_currency\_code
* daily\_budget\_amount
* unit\_cost\_currency\_code
* unit\_cost\_amount
* local\_country
* local\_language
* name
* objective\_type
* run\_schedule\_start
* run\_schedule\_end
* total\_budget\_currency\_code
* total\_budget\_amount
* type
* version\_version\_tag
* status
* story\_delivery\_enabled
* optimization\_target\_type
* format
* pacing\_strategy
* test
* story\_delivery\_enabled
* offsite\_delivery\_enabled
* created\_time
* last\_modified\_time

</details>

<details>

<summary>Campaign_Group</summary>

* id
* account\_id
* backfilled
* name
* run\_schedule\_start
* run\_schedule\_end
* status
* total\_budget\_amount
* total\_budget\_currency\_code
* test
* created\_time
* last\_modified\_time

</details>

<details>

<summary>Campaigns_Associated_With_Conversions</summary>

* campaign\_id
* conversion\_id
* associated\_at

</details>

<details>

<summary>Conversion</summary>

* id
* account\_id
* attribution\_type
* enabled
* name
* latest\_first\_party\_callback
* post\_click\_attribution\_window\_size
* view\_through\_attribution\_window\_size
* last\_callback\_at
* value\_amount
* value\_currency\_code
* created
* last\_modified

</details>

<details>

<summary>Creative</summary>

* id
* campaign\_id
* clickURL
* processing\_state
* reference
* review\_stats
* rejection\_status
* status
* type
* test
* created\_time
* last\_modified\_time
* version\_version\_tag

</details>

<details>

<summary>Follower_Stats</summary>

* date
* organization\_id
* organic\_follower\_gain
* paid\_follower\_gain

</details>

<details>

<summary>Organization</summary>

* id
* default\_local\_country
* default\_local\_language
* deleted\_at
* version\_tag
* founded\_on
* localized\_description
* localized\_name
* parent
* organization\_relationship\_type
* parent\_relationship\_status
* vanity\_name
* localized\_website
* staff\_count\_range
* organization\_status
* organization\_type
* primary\_organization\_type

</details>

<details>

<summary>Page_Stats</summary>

* date
* organization\_id
* views\_about\_page\_\*
* views\_career\_page\_\*
* views\_desktop\_\*
* views\_life\_at\_\*
* views\_mobile\_\*
* views\_overview\_page\_\*

</details>

<details>

<summary>Share_Stats</summary>

* date
* organization\_id
* click\_count
* comment\_count
* comment\_mentions\_count
* engagement
* impression\_count
* ike\_count
* share\_count
* share\_mentions\_count
* unique\_impressions\_count

</details>

<details>

<summary>Video_Ads</summary>

* content\_reference
* account\_id
* name
* owner
* type

</details>
