๐Ÿ”ŒSetting up a LinkedIn Ads Connector

Linkedin Ads Connectorยถ

This connector is used to retrieve data from the Linkedin Ads API: Linkedin Documentation

What is it?ยถ

Linkedin Ads has a marketing api offering that provides data for reporting about various resources like campaigns, creatives, user profile data etc.

How to connect ?ยถ

You need to have the credentials of the linkedin ads account, when you shall be prompted to generate the access token later. We can utilise the rest api connector available in toucan to get the data, all we need to are 3 things in general:

1) Create an app on linkedin dev platform. Get the approval from linkedin for accessing the marketing api. You will be asked to fill in a request access from that will usually be approved within 3 - 5 business days.

Access to LinkedInโ€™s marketing APIs requires a developer application that has been granted access to the Marketing Developer Platform(MDP). If you donโ€™t have an app yet, you can create one through the create app form. Otherwise, you can see the list of your apps through the Developer Portal.

Note: We are using the 3 legged Flow for authorization and not the 2 - legged one as we cannot get access to the marketing api in the latter method.

2) Once you get the approval, configure the redirect uri with the URI provided in the credentials manager, copy the client_id et client_secret and paste them in the credentials manager interface. The redirect URI should be like this: https://api-yourinstance.toucantoco.com/oauth/redirect?type=LinkedinAds

Okay, great work in configuring the credentials ! Now, you need to configure the data provider . Linkedin ads has a CAMPAIGN Manager where all the campaigns, creatives , analytics information are stored. This is from where we are fetching all the data, we need to know atleast the basic required parameters like Creative / Campaign ID. (Campaign tab has all the campaigns listed along with the info like campaign id and similarly all the creatives are in the Ads tab)

Navigate to the connector interface from the DATA section in Toucan studio.

  • Select the option Add a connector

  • Then search up the connector from the list and select the LinkedinAds connector.

Data provider configuration As soon as you click on the connector icon, you will be redirected to Linkedin to sign in to your account.

After logging in, you shall be redirected back to Toucan, where you will have the required attributes automatically filled by Toucan ๐Ÿ˜„. You just need to give a name to your connector.

There is an optional Template option to provide parameters at the connector level instead of in the data source. Now, You just need to TEST CONNECTION and finally SAVE it ๐Ÿ˜„

After successfully, configuring the data provider you can see in your connectors interface that your newly configured data provider is available. Now click on the + symbol that says ADD A QUERY to actually query the data provider and extract data into Toucan! (Data source)

Data source configuration Now that we have configured the data provider, its time to set the data source or in simple terms, the table that we are going to query and use to populate the charts in Toucan.

We need to fill in the details regarding the query to send to the API.

  • finder_method: str, required, default to โ€œanalyticsโ€

  • start date: str, required. Format dd/mm/yyyy.

  • end date: str, optional. Format dd/mm/yyyy. Defaults to today

  • TimeGranularity: str. By โ€œALLโ€, available: โ€œDAILYโ€, โ€œMONTHLYโ€, โ€œYEARLYโ€

  • Flatten Column: str, optional. Allows to unest nested column from the APIโ€™s response

  • Parameters: dict, some parameters are required, see below for an example

You can have a look at this below image to have an understanding of โ€˜where to findโ€™ the required parameters for filling the data source config:

Configuration Example:

Now you can start to play with you Linkedin Ads Data ๐Ÿ”ฅ

Last updated