Conversion Tracking

Conversion tracking gives advertisers confidence that an ad product delivers a measurable return on investment. This includes better ad reporting based on tracked conversions coming from impressions, the ability to optimize campaigns through better targeting and impression delivery, and more efficient media planning and budget allocation through impression tracking and attribution.

Permissions

Permission Description
rw_ads Manage and read an authenticated member's ad accounts. Restricted to ad accounts in which the authenticated member has one of the following ad account roles.
  • ACCOUNT_BILLING_ADMIN
  • ACCOUNT_MANAGER
  • CAMPAIGN_MANAGER
  • CREATIVE_MANAGER
r_ads Read an authenticated member's ad accounts. Restricted to ad accounts in which the authenticated member has one of the following ad account roles.
  • ACCOUNT_BILLING_ADMIN
  • ACCOUNT_MANAGER
  • CAMPAIGN_MANAGER
  • CREATIVE_MANAGER
  • VIEWER

See Account Access Controls for more information on ad account roles.

Requirements

See the following setup requirements to perform conversion tracking:

  1. Create Insight Tag for an advertiser account
  2. Deploy the Insight Tag JavaScript snippet in a common header or footer on the advertiser’s site. This is your tracking code and is unique to the advertiser account
  3. Create one or more conversions that have URL matching rules or conversion image pixel
  4. Add campaign(s) to the conversions

Note

Advertisers with an existing Insight Tag and LLA relationship must have their LLA account internally white listed.

Insight Tags

Schema

Field Type Description Example
id long The ID for this Insight Tag. 100
tag string The HTML tag contents, either the JS or the image. Read-only. <script type=\"text/javascript\"></script>
sponsoredAccounts SponsoredAccountUrn[]
default=[]
Identifies the sponsored accounts associated with this Insight Tag. Create-only. ["urn:li:sponsoredAccount:123456"]
firstPartyTrackingEnabled boolean
default=true
If first party tracking is enabled for this Insight Tag, then the Insight Tag will attempt to drop a first party cookie on the advertiser's domain given that the page url contains the 1st party tracking id. This setting will propagate to all the accounts with the same Insight Tag. See also: First-Party Cookies on LinkedIn. true

Create an Insight Tag

Create Insight Tag for given Ad account. Copy the tag code from newly created Insight Tag and paste at global footer, right above the closing of HTML <body> tag of advertiser’s website. Adding the tag to the global footer will let you track conversions or re-target on any page across your whole site.

POST https://api.linkedin.com/v2/insightTags

Request Body Fields

Field key Field Descriptions
sponsoredAccounts Sponsored accounts associated with this insight tag. Passing multiple Ad accounts won't create insight tag for all Ad accounts. It will fail to create insight tag. Use Insight Tag Permissions endpoint to share this insight with other Ad Accounts. Create-Only

Sample Request

POST https://api.linkedin.com/v2/insightTags
{
  "sponsoredAccounts": [
    "urn:li:sponsoredAccount:123456"
  ]
}

Sample Response

HTTP/1.1 201 Created
Content-Type: application/json
Location: /insightTags/100
X-RestLi-Id: 100
X-RestLi-Protocol-Version: 2.0.0

{
  "firstPartyTrackingEnabled": true,
  "sponsoredAccounts": [
    "urn:li:sponsoredAccount:123456"
  ],
  "id": 100,
  "tag": "<script type=\"text/javascript\"></script>"
}

A successful response returns a 201 Created HTTP status code and the ID in the X-LinkedIn-Id response header.

Once the tag is installed on your website and traffic to your site exists, you can verify the tag is working by making the Find Insight Tag Domains by Account request. It takes 5 to 10 minutes to populate insight tag domains after the webpage is updated with Insight Tag JavaScript and after a visit to that webpage.

Find Insight Tag by Account

Find the Insight Tag for a given Ad account. An account can have only one Insight Tag.

GET https://api.linkedin.com/v2/insightTags?q=account&account={encoded sponsoredAccountUrn}

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json
ETag: W/"0"
X-RestLi-Protocol-Version: 2.0.0

{
  "elements": [
    {
      "firstPartyTrackingEnabled": true,
      "sponsoredAccounts": [
        "urn:li:sponsoredAccount:123456"
      ],
      "id": 100,
      "tag": "<script type=\"text/javascript\"></script>"
    }
  ],
  "paging": {
    "count": 10,
    "start": 0,
    "links": []
  }
}

Get Insight Tag

Get Insight Tag for a given Insight Tag ID.

GET https://api.linkedin.com/v2/insightTags/{InsightTagID}

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json
ETag: W/"0"
X-RestLi-Protocol-Version: 2.0.0

{
  "firstPartyTrackingEnabled": true,
  "sponsoredAccounts": [
    "urn:li:sponsoredAccount:123456"
  ],
  "id": 100,
  "tag": "<script type=\"text/javascript\"></script>"
}

Partial Update Insight Tag

Update Insight Tag’s firstPartyTrackingEnabled using this API. Please make sure the header X-RestLi-Method must be included in the request and set to PARTIAL_UPDATE.

Sample Request

POST https://api.linkedin.com/v2/insightTags/100
{
  "patch": {
    "$set": {
      "firstPartyTrackingEnabled": true
    }
  }
}

Sample Response

HTTP/1.1 204 No Content
ETag: W/"0"
X-RestLi-Protocol-Version: 2.0.0


Insight Tag Permissions

There are two access roles for Insight Tag permissions: FULL (administrator) and USE_ONLY.

  • FULL has general administrative permissions to the Insight Tag.
  • USE_ONLY can only edit and view conversions and match rules.

More details about what actions each role can take are in the table below.

Access role View Insight Tag Update Insight Tag Grant/revoke Insight Tag Access Update Insight Tag Domains
FULL Yes Yes Yes Yes
USE_ONLY Yes No No No

When creating an Insight Tag, the advertiser account creating the Insight Tag gets the FULL role by default. Alternatively, an advertiser account that does not have an Insight Tag can be granted FULL or USE_ONLY access to an Insight Tag from another advertiser account.

A Sponsored Account can have only one Insight Tag associated to it at any given time. An Insight Tag may have multiple ad accounts associated with it. An Insight Tag must have at least 1 account with FULL access assigned.

If a Sponsored Account with an existing Insight Tag wants to use a different or new Insight Tag, the account must:

  1. Ensure at least 1 other Ad Account has FULL access to the Insight Tag. This role must be passed to another Ad Account if no other Ad Account currently has FULL access.
  2. Revoke access to the Insight Tag for the original Ad Account.
  3. Give FULL access to a new Insight Tag that a different Ad Account currently has FULL access to.

Insight Tag Permissions for an Advertiser Account

To query for the access role associated to an advertiser account and Insight Tag, use q=account and the sponsoredAccountUrn.

GET https://api.linkedin.com/v2/insightTagsPermission?account={sponsoredAccountUrn}&q=account

Sample Response

{
    "elements": [
        {
            "account": "urn:li:sponsoredAccount:123456",
            "insightTag": "urn:tscp:insightTag:100",
            "role": "FULL"
        }
    ],
    "paging": {
        "count": 10,
        "links": [],
        "start": 0
    }
}

Grant Insight Tag Access to a Different Advertiser Account

Give access to another Ad Account by granting an access role to an Insight Tag.

POST https://api.linkedin.com/v2/insightTagsPermission?action=grantAccess

Request Body Fields

Field key Field Descriptions
account The sponsored account URN.
insightTag The Insight Tag URN.
targetAccount The sponsored account URN of the recipient.
role FULL or USE_ONLY

Sample Request

POST https://api.linkedin.com/v2/insightTagsPermission?action=grantAccess
{
    "account": "urn:li:sponsoredAccount:123456",
    "insightTag": "urn:tscp:insightTag:100",
    "targetAccount": "urn:li:sponsoredAccount:7890",
    "role": "FULL"
}

Revoke Insight Tag Access from an Advertiser Account

Revoke access to another advertiser account by removing an access role to an Insight Tag.

An Insight Tag must be associated with at least one Ad Account. The API does not allow you to revoke access to an Insight Tag when there's only one remaining associated Ad Account because it would create an orphan Insight Tag.

POST https://api.linkedin.com/v2/insightTagsPermission?action=revokeAccess

Request Body Fields

Field key Field Descriptions
account The sponsored account URN.
insightTag The Insight Tag URN.
targetAccount The sponsored account URN of the recipient.

Sample Request

POST https://api.linkedin.com/v2/insightTagsPermission?action=revokeAccess
{
    "account": "urn:li:sponsoredAccount:123456",
    "insightTag": "urn:tscp:insightTag:100",
    "targetAccount": "urn:li:sponsoredAccount:7890"
}

Insight Tag Domains V2

Once the Insight Tag code is placed on the partner’s sites, we will receive signals from these sites. The list of domains associated with this Insight Tag will be automatically populated. Advertisers can also block any unrecognized domains. Blocking a domain may impact associated conversions, website audiences and website demographics.

Schema

Field Description Example
created A timestamp corresponding to the creation of the domain 1560228798550
insightTag The Insight Tag Urn for this domain. urn:tscp:insightTag:100
domainName The domain name without the protocol. www.example.com
lastCallbackAt The last time (in milliseconds) the Insight Tag for this domain called back to the server. 1560228798550
blocked Whether this domain should be tagged as blocked. Block domains will not send a signal to downstream services, so conversion tracking, re-targeting, etc won't get captured under blocked domains. true

Find Insight Tag Domains by Account

Find all the domains associated with an Ad account. Sorted by most recent first. Returns a max of 100 records if no count is specified.

Sample Request

GET https://api.linkedin.com/v2/insightTagDomainsV2?q=account&account=urn%3Ali%3AsponsoredAccount%3A123456

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json
ETag: W/"0"
X-RestLi-Protocol-Version: 2.0.0

{
    "elements": [
        {
            "created": 1560228798550,
            "blocked": false,
            "lastCallbackAt": 1560228798550,
            "domainName": "www.yourdomain.com",
            "insightTag": "urn:tscp:insightTag:100"
        },
        {
            "created": 1560228798550,
            "blocked": false,
            "lastCallbackAt": 1560228798550,
            "domainName": "www.example.com",
            "insightTag": "urn:tscp:insightTag:101"
        },
        ...
    ],
"paging": {
  "count": 10,
  "start": 0,
  "links":[]
}
}

Partial Update Insight a Tag Domain

Update Insight Tag domain using partial update. Advertiser can block/allow domain using this method. Blocking a domain may impact associated conversions, website audiences and website demographics.

Sample Request

POST https://api.linkedin.com/v2/insightTagDomainsV2/(account:urn%3Ali%3AsponsoredAccount%3A123456,domainName:www.example.com)
{
  "patch": {
    "$set": {
      "blocked": true
    }
  }
}

Sample Response

HTTP/1.1 204 No Content
ETag: W/"0"
X-RestLi-Protocol-Version: 2.0.0


Batch Partial Update Insight Tag Domains

Bulk update insight tag domains using batch partial update. Advertiser can block/allow domains using this method. Blocking a domain may impact associated conversions, website audiences and website demographics.

Sample Request

POST https://api.linkedin.com/v2/insightTagDomainsV2?ids=List((account:urn%3Ali%3AsponsoredAccount%3A123456,domainName:www.yourdomain.com),(account:urn%3Ali%3AsponsoredAccount%3A123456,domainName:www.example.com))
{
  "entities": {
    "(account:urn%3Ali%3AsponsoredAccount%3A123456,domainName:www.yourdomain.com)": {
      "patch": {
        "$set": {
          "blocked": false
        }
      }
    },
    "(account:urn%3Ali%3AsponsoredAccount%3A507578740,domainName:www.example.com)": {
      "patch": {
        "$set": {
          "blocked": true
        }
      }
    }
  }
}

Sample Response

HTTP/1.1 200 OK
X-LI-ResponseOrigin: RGW
Content-Type: application/json
ETag: W/"2113768114"
X-RestLi-Protocol-Version: 2.0.0
Content-Length: 285

{
    "results": {
        "(account:urn%3Ali%3AsponsoredAccount%3A123456,domainName:www.yourdomain.com)": {
            "status": 204
        },
        "(account:urn%3Ali%3AsponsoredAccount%3A123456,domainName:www.example.com)": {
            "status": 204
        }
    },
    "errors": {}
}

Insight Tag Domains (Deprecated)

Important

This endpoint is deprecated as of August 26 and will be removed November 26, 2019. Domains added using this endpoint are available at Insight Tag Domains V2 assuming that Insight Tag script is still placed on Advertiser's website.

Create an Insight Tag Domain

To begin, you must create an association between the website domain(s) and an advertiser account.

Each unique site needs to be registered to the advertiser account before using the Insight Tag. You can register multiple domain names to an Insight Tag.

POST https://api.linkedin.com/v2/insightTagDomains

Request Body Fields

Field Key Field Descriptions Example
account The sponsored account URN. Specified in the URL query parameter and the request JSON body. urn:li:sponsoredAccountUrn:123456
domainName The FQDN of the website that the partner intends to register. There should be no paths or protocols included. If multiple are provided, this behaves as a batch create. bigcompany.com

Schema

Response Field Key Response Field Descriptions
id The ID of the InsightTagDomain.
account The sponsored account URN.
domainName The exact domain name.
lastCallbackAt The last time the Insight Tag for this domain called back to the server. Expected to update no more than a couple of hours after the callback was received. In milliseconds.
created A timestamp corresponding to the creation of this resource. In milliseconds.
lastModified A timestamp corresponding to the last modification of this resource. If no modification has occurred since creation, lastModified should be the same as created. In milliseconds.

Sample Response

{
    "account": "urn:li:sponsoredAccount:123456",
    "created": 1447843020000,
    "domainName": "example.com",
    "id": 27858,
    "lastModified": 1450814011000
}

A successful response returns a 201 Created HTTP status code.

Batch Create

You can create multiple insightTagDomains by passing the X-RestLi-Method: BATCH_CREATE header and including multiple records in the elements array.

Sample Request

{
    "elements": [
        {
            "account": "urn:li:sponsoredAccount:123456",
            "domainName": "example.com"
        },
        {
            "account": "urn:li:sponsoredAccount:123456",
            "domainName": "example2.com"
        }
    ]
}

Sample Response

The response to Batch Create will return an array with results for each record.

{
    "elements": [
        {
            "entity": {
                "account": "urn:li:sponsoredAccount:103319",
                "created": 1447843020000,
                "domainName": "example.com",
                "id": 27858,
                "lastModified": 1450814011000
            },
            "id": "27858",
            "status": 201
        },
        {
            "entity": {
                "account": "urn:li:sponsoredAccount:103319",
                "created": 1449693736000,
                "domainName": "example2.com",
                "id": 28128,
                "lastModified": 1449693736000
            },
            "id": "28128",
            "status": 201
        }
    ]
}

Get Insight Tag Domains

The following endpoint returns a single insightTagDomain record.

GET https://api.linkedin.com/v2/insightTagDomains/{insightTagDomainId}?account={sponsoredAccountUrn}

Sample Response

{ "created": 1447843020000, "domainName": "example.com", "lastModified": 1450814011000, "id": 27858, "account": "urn:li:sponsoredAccount:103319" }

Batch Get

Multiple records can be requested with a Batch Get that accepts multiple ids parameters each with an insightTagDomain ID.

GET https://api.linkedin.com/v2/insightTagDomains?ids={insightTagDomainId1}&ids={insightTagDomainId2}&ids={insightTagDomainId3}&account={sponsoredAccountUrn}

Sample Response

{
    "errors": {},
    "results": {
        "27858": {
            "account": "urn:li:sponsoredAccount:103319",
            "created": 1447843020000,
            "domainName": "example.com",
            "id": 27858,
            "lastCallbackAt": 1450814011000,
            "lastModified": 1450814011000
        },
        "28815": {
            "account": "urn:li:sponsoredAccount:103319",
            "created": 1456513904000,
            "domainName": "high.com",
            "id": 28815,
            "lastModified": 1456513904000
        }
    },
    "statuses": {}
}

Find Insight Tag Domains by Account

All Insight Tag Domains associated with an Ad Account can be used with the following endpoint:

GET https://api.linkedin.com/v2/insightTagDomains?q=account&account={sponsoredAccountURN}

For more precision, you can also include a domainName parameter.

GET https://api.linkedin.com/v2/insightTagDomains?q=accountAndDomainName&account={sponsoredAccountURN}&domainName={domainName}

Sample Response

{
    "elements": [
        {
            "account": "urn:li:sponsoredAccount:12345",
            "created": 1447843020000,
            "domainName": "example.com",
            "id": 27858,
            "lastCallbackAt": 1450814011000,
            "lastModified": 1450814011000
        },
        {
            "account": "urn:li:sponsoredAccount:12345",
            "created": 1449693736000,
            "domainName": "example2.com",
            "id": 28128,
            "lastCallbackAt": 1450814011000,
            "lastModified": 1449693736000
        }
    ],
    "paging": {
        "count": 10,
        "links": [],
        "start": 0
    }
}

Conversions

LinkedIn conversion tracking is an analytical function powered by the LinkedIn Insight Tag. Conversions are actions a member makes that are valuable to your business. Conversion tracking gathers insights into post-click and view-through conversions of your LinkedIn ads campaigns, giving you the ability to measure the impact and ROI of your ads.

The Conversion API supports both event-specific and site-wide tags.

For more information on conversion tracking, see this help article.

Create a Conversion

Conversions can be created with the following endpoint. Include rules in the urlMatchRuleExpression field (instead of deprecated urlRules) to track site-wide conversions. Don't include any urlMatchRuleExpression to track event-specific conversions.

POST https://api.linkedin.com/v2/conversions

Schema

Field Key Field Descriptions
attributionType LAST_TOUCH_BY_CAMPAIGN(DEFAULT) LAST_TOUCH_BY_CONVERSION LAST_TOUCH_BY_CAMPAIGN(Each campaign): conversion actions are counted once for each campaign to which they can be attributed

LAST_TOUCH_BY_CONVERSION(Single Campaign): conversion actions are counted once for each Conversion with at least one associated campaign. learn more
domainId Deprecated as of August 26 and will be removed November 26, 2019 We will no longer match the domain while processing conversion events. Attributing conversions is purely based on conversion rules that defined in urlRule(deprecated) or urlMatchRuleExpression.
account The Sponsored Account URN that this Conversion resides under. This can be either specified in URL query parameter or in the request JSON body.
enabled Set to true or false to enable or disable this rule from matching on the advertiser’s website. The initial state can be either, but only rules that are enabled will trigger conversion events.
name A short name for this rule, which will be shown in the UI and in reports.
type The type of the rule. Can be one of the following:
  • ADD_TO_CART - The user added one or more things to their shopping cart.
  • DOWNLOAD - The user downloaded a file.
  • INSTALL - The user installed a plugin or an app.
  • KEY_PAGE_VIEW - The user viewed an important web page or app screen.
  • LEAD - The user filled out a lead generation form.
  • PURCHASE - The user made a purchase.
  • SIGN_UP - The user signed up for a web site or app service.
  • OTHER - Other case not listed above.
latestFirstPartyCallbackAt Time in milliseconds Read Only As part of mitigating Intelligent Tracking Prevention, we have introduced an option to advertisers so that they can choose to drop LINKEDIN cookies as first party cookies or third party cookies. This field will help in debugging when advertisers switch from first party to third party.
postClickAttributionWindowSize int, default="30" Specifies a user's settings on the post click attribution window in days. By setting these fields to something else, the advertiser can narrow the window. Allowed values are 1, 7, or 30. learn more
viewThroughAttributionWindowSize int, default="7" Specifies a user's settings on the view through (post view) attribution window in days. By setting these fields to something else, the advertiser can narrow the window. Allowed values are 1, 7, or 30. learn more
lastCallbackAt Time in milliseconds Read Only The last time one or more of the URL match rules fired and called back to the server. It may take 20 min to update.
value Optional. The monetary value for this conversion. If this is set, the currency code should be identical to the currency set on the advertiser account.
currencyCode Identifying code for currency type. See currency codes for the valid codes.
amount The amount of money as a real number string.
associatedCampaigns URN CampaignConversion[] Read only. Array of campaigns associated with this conversion.
campaigns Optional Deprecated(Nov 26 2019) An array of Sponsored Campaigns associated with this Conversion. Use associatedCampaigns field to get campaigns that are currently associated with this conversion. To associate new campaigns, use campaignConversions endpoint. Campaigns should consist of the creative you want to show in order to drive a particular outcome on the advertiser’s website. The Sponsored Campaigns represent the media and the Conversion represents the outcome. If omitted, the Conversion will have an empty array of campaigns. If a conversion is not tied to any campaign, no conversions are included in the report statistics.
urlMatchRuleExpression urlMatchRuleExpression Expression used to determine if a page view event matches. The top-level expression is the logical disjunction(OR) of AdUrlMatchRules, that are grouped by logical conjunction(AND). Example: (matchRule1 AND matchRule2 AND matchRule3) OR (matchRule4 AND matchRule2). Refer to sample request on how to build these rules.
matchType The type of this match rule that specifies how the URL will be matched. Can be one of the following:
  • EXACT - The match is exact.
  • STARTS_WITH - A prefix to match.
  • CONTAINS - A substring to match, multiple substrings can be supplied separated by an "OR" boolean.
matchValue The URL value text to match. Regular expressions or special syntax are not supported. Examples: 'www.example.com', 'example.com/download.php', 'example.com/download/coolWhitepaper'. For CONTAINS only: 'example.com/order OR example.com/checkout'. There is no need to include the protocol (for example, http, https).
urlRules Deprecated as of August 26 and will be removed November 26, 2019 We now have a new field urlMatchRuleExpression that supports AND and OR operations.
type The type of this match rule that specifies how the URL will be matched. Can be one of the following:
  • EXACT - The match is exact.
  • STARTS_WITH - A prefix to match.
  • CONTAINS - A substring to match, multiple substrings can be supplied separated by an "OR" boolean.
matchValue The URL value text to match. Regular expressions or special syntax are not supported. Examples: 'www.example.com', 'example.com/download.php', 'example.com/download/coolWhitepaper'. For CONTAINS only: 'example.com/order OR example.com/checkout'. There is no need to include the protocol (for example, http, https).

Sample Request

POST https://api.linkedin.com/v2/conversions
{
  "postClickAttributionWindowSize": 7,
  "viewThroughAttributionWindowSize": 1,
  "type": "OTHER",
  "name": "test",
  "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
  "account": "urn:li:sponsoredAccount:519072844",
  "urlMatchRuleExpression": [
    [
      {
        "matchType": "STARTS_WITH",
        "matchValue": "www.yourdomain.com/category"
      },
      {
        "matchType": "CONTAINS",
        "matchValue": "/product1"
      },
      {
        "matchType": "CONTAINS",
        "matchValue": "/sku100"
      }
    ],
    [
      {
        "matchType": "STARTS_WITH",
        "matchValue": "www.yourdomain.com"
      },
      {
        "matchType": "CONTAINS",
        "matchValue": "/product1"
      }    ]
  ]
}

Sample Response

{
  "postClickAttributionWindowSize": 7,
  "created": 1566320988691,
  "viewThroughAttributionWindowSize": 1,
  "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=107612&fmt=img\" />",
  "type": "OTHER",
  "enabled": true,
  "associatedCampaigns": [],
  "campaigns": [],
  "name": "test",
  "urlMatchRuleExpression": [
    [
      {
        "matchType": "STARTS_WITH",
        "matchValue": "www.yourdomain.com/category"
      },
      {
        "matchType": "CONTAINS",
        "matchValue": "/product1"
      },
      {
        "matchType": "CONTAINS",
        "matchValue": "/sku100"
      }
    ],
    [
      {
        "matchType": "STARTS_WITH",
        "matchValue": "www.yourdomain.com"
      },
      {
        "matchType": "CONTAINS",
        "matchValue": "/product1"
      }
    ]
  ],
  "lastModified": 1566320988691,
  "id": 107612,
  "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
  "urlRules": [],
  "key": {
    "id": 107612,
    "account": "urn:li:sponsoredAccount:519072844"
  },
  "account": "urn:li:sponsoredAccount:519072844"
}

A successful response returns a 201 Created HTTP status code and the ID in the X-LinkedIn-Id response header.

Batch Create

When you create multiple conversions, the header X-RestLi-Method must be included in the request and set to BATCH_CREATE.

Sample Request

POST https://api.linkedin.com/v2/conversions
{
  "elements": [
    {
      "postClickAttributionWindowSize": 7,
      "viewThroughAttributionWindowSize": 1,
      "type": "OTHER",
      "name": "test 1 last touch bby campaign",
      "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
      "account": "urn:li:sponsoredAccount:519072844"
    },
    {
      "postClickAttributionWindowSize": 7,
      "viewThroughAttributionWindowSize": 1,
      "type": "OTHER",
      "name": "test",
      "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
      "account": "urn:li:sponsoredAccount:519072844",
      "urlMatchRuleExpression": [
        [
          {
            "matchType": "STARTS_WITH",
            "matchValue": "www.yourdomain.com/products"
          },
          {
            "matchType": "CONTAINS",
            "matchValue": "/category/"
          }
        ],
        [
          {
            "matchType": "EXACT",
            "matchValue": "www.yourdomain.com/orderConfirmation"
          }
        ]
      ]
    }
  ]
}

Sample Response

{
  "elements": [
    {
      "location": "/conversions/107628",
      "id": "107628",
      "entity": {
        "postClickAttributionWindowSize": 7,
        "created": 1566323091819,
        "viewThroughAttributionWindowSize": 1,
        "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=107628&fmt=img\" />",
        "type": "OTHER",
        "enabled": true,
        "associatedCampaigns": [],
        "campaigns": [],
        "name": "test 1 last touch bby campaign",
        "lastModified": 1566323091819,
        "id": 107628,
        "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
        "urlRules": [],
        "account": "urn:li:sponsoredAccount:519072844"
      },
      "status": 201
    },
    {
      "location": "/conversions/107620",
      "id": "107620",
      "entity": {
        "postClickAttributionWindowSize": 7,
        "created": 1566323091819,
        "viewThroughAttributionWindowSize": 1,
        "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=107620&fmt=img\" />",
        "type": "OTHER",
        "enabled": true,
        "associatedCampaigns": [],
        "campaigns": [],
        "name": "test",
        "urlMatchRuleExpression": [
          [
            {
              "matchType": "STARTS_WITH",
              "matchValue": "www.yourdomain.com/products"
            },
            {
              "matchType": "CONTAINS",
              "matchValue": "/category/"
            }
          ],
          [
            {
              "matchType": "EXACT",
              "matchValue": "www.yourdomain.com/orderConfirmation"
            }
          ]
        ],
        "lastModified": 1566323091819,
        "id": 107620,
        "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
        "urlRules": [],
        "account": "urn:li:sponsoredAccount:519072844"
      },
      "status": 201
    }
  ]
}

Get Conversions

The following endpoint returns a single conversion record.

GET https://api.linkedin.com/v2/conversions/{conversionId}?account={sponsoredAccountUrn}

Sample Response

{
  "postClickAttributionWindowSize": 1,
  "viewThroughAttributionWindowSize": 1,
  "created": 1566323091819,
  "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=107620&fmt=img\" />",
  "type": "OTHER",
  "enabled": true,
  "associatedCampaigns": [
    {
      "campaign": "urn:li:sponsoredCampaign:345396555",
      "associatedAt": 1563657869695,
      "conversion": "urn:lla:llaPartnerConversion:104012"
    }
  ],
  "campaigns": [
    "urn:li:sponsoredCampaign:345396555"
  ],
  "urlMatchRuleExpression": [
    [
      {
        "matchType": "STARTS_WITH",
        "matchValue": "www.yourdomain.com"
      },
      {
        "matchType": "CONTAINS",
        "matchValue": "/category/"
      }
    ],
    [
      {
        "matchType": "EXACT",
        "matchValue": "www.yourdomain.com/order-confirmation"
      }
    ]
  ],
  "name": "test 1 last touch by campaign",
  "lastModified": 1566325446875,
  "id": 104012,
  "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
  "urlRules": [],
  "account": "urn:li:sponsoredAccount:519072844"
}

Batch Get

Multiple records can be requested with a Batch Get that accepts multiple ids parameters each with a conversion ID. Conversion ids should be passed in List format and encoded as shown in the examples below. Also API request requires the header X-Restli-Protocol-Version: 2.0.0.

GET https://api.linkedin.com/v2/conversions?account=urn%3Ali%3AsponsoredAccount%3A519072844&ids=List(104012,104004)

Sample Response

{
  "statuses": {},
  "results": {
    "104004": {
      "postClickAttributionWindowSize": 30,
      "created": 1563230255308,
      "viewThroughAttributionWindowSize": 7,
      "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=104004&fmt=img\" />",
      "type": "ADD_TO_CART",
      "enabled": true,
      "associatedCampaigns": [
        {
          "campaign": "urn:li:sponsoredCampaign:345396555",
          "associatedAt": 1563657869695,
          "conversion": "urn:lla:llaPartnerConversion:104004"
        }
      ],
      "campaigns": [
        "urn:li:sponsoredCampaign:345396555"
      ],
      "name": "test",
      "lastModified": 1563230265652,
      "id": 104004,
      "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
      "urlRules": [],
      "value": {
        "amount": "10",
        "currencyCode": "USD"
      },
      "account": "urn:li:sponsoredAccount:519072844"
    },
    "104012": {
      "postClickAttributionWindowSize": 30,
      "created": 1563230311551,
      "viewThroughAttributionWindowSize": 7,
      "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=104012&fmt=img\" />",
      "type": "ADD_TO_CART",
      "enabled": true,
      "associatedCampaigns": [
        {
          "campaign": "urn:li:sponsoredCampaign:345396555",
          "associatedAt": 1563657869695,
          "conversion": "urn:lla:llaPartnerConversion:104012"
        }
      ],
      "campaigns": [
        "urn:li:sponsoredCampaign:345396555"
      ],
      "name": "test via campaign creation",
      "urlMatchRuleExpression": [
        [
          {
            "matchType": "CONTAINS",
            "matchValue": "thankyou"
          }
        ],
        [
          {
            "matchType": "EXACT",
            "matchValue": "www.yourdomain.com/thankyou"
          }
        ]
      ],
      "lastModified": 1563831171814,
      "id": 104012,
      "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
      "urlRules": [
        {
          "matchValue": "thankyou",
          "type": "CONTAINS"
        },
        {
          "matchValue": "EXACT",
          "type": "www.yourdomain.com/thankyou"
        }
      ],
      "value": {
        "amount": "10",
        "currencyCode": "USD"
      },
      "account": "urn:li:sponsoredAccount:519072844"
    }
  },
  "errors": {}
}

Find Conversions by Ad Account

All conversions associated with an ad account can be retrieved by using the following API which takes in a sponsoredAccount URN in the account parameter.

GET https://api.linkedin.com/v2/conversions?q=account&account=urn%3Ali%3AsponsoredAccount%3A519072844

Sample Response

{
  "elements": [
    {
      "postClickAttributionWindowSize": 30,
      "viewThroughAttributionWindowSize": 7,
      "created": 1563230311551,
      "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=104012&fmt=img\" />",
      "type": "ADD_TO_CART",
      "enabled": true,
      "associatedCampaigns": [
        {
          "campaign": "urn:li:sponsoredCampaign:345396555",
          "associatedAt": 1563657869695,
          "conversion": "urn:lla:llaPartnerConversion:107620"
        }
      ],
      "campaigns": [
        "urn:li:sponsoredCampaign:345396555"
      ],
      "name": "test via campaign creation",
      "urlMatchRuleExpression": [
        [
          {
            "matchType": "CONTAINS",
            "matchValue": "thankyou"
          }
        ]
      ],
      "lastModified": 1563230311551,
      "id": 104012,
      "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
      "urlRules": [
        {
          "matchValue": "thankyou",
          "type": "CONTAINS"
        }
      ],
      "value": {
        "amount": "10",
        "currencyCode": "USD"
      },
      "account": "urn:li:sponsoredAccount:519072844"
    },
    {
      "postClickAttributionWindowSize": 30,
      "viewThroughAttributionWindowSize": 7,
      "created": 1563230255308,
      "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=104004&fmt=img\" />",
      "type": "ADD_TO_CART",
      "enabled": true,
      "associatedCampaigns": [
        {
          "campaign": "urn:li:sponsoredCampaign:345396555",
          "associatedAt": 1563657869695,
          "conversion": "urn:lla:llaPartnerConversion:104004"
        }
      ],
      "campaigns": [
        "urn:li:sponsoredCampaign:345396555"
      ],
      "name": "test",
      "lastModified": 1563230265652,
      "id": 104004,
      "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
      "urlRules": [],
      "value": {
        "amount": "10",
        "currencyCode": "USD"
      },
      "account": "urn:li:sponsoredAccount:519072844",
      "key": {
        "id": 104004,
        "account": "urn:li:sponsoredAccount:519072844"
      }
    },
    {
      "postClickAttributionWindowSize": 30,
      "viewThroughAttributionWindowSize": 7,
      "created": 1558369606720,
      "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=94924&fmt=img\" />",
      "type": "ADD_TO_CART",
      "enabled": false,
      "associatedCampaigns": [],
      "campaigns": [],
      "name": "test 123",
      "lastModified": 1558369606720,
      "id": 94924,
      "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
      "urlRules": [],
      "value": {
        "amount": "0",
        "currencyCode": "USD"
      },
      "account": "urn:li:sponsoredAccount:519072844",
      "key": {
        "id": 94924,
        "account": "urn:li:sponsoredAccount:519072844"
      }
    },
    {
      "postClickAttributionWindowSize": 30,
      "viewThroughAttributionWindowSize": 7,
      "created": 1558369532355,
      "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=94916&fmt=img\" />",
      "type": "ADD_TO_CART",
      "enabled": true,
      "associatedCampaigns": [
        {
          "campaign": "urn:li:sponsoredCampaign:345396555",
          "associatedAt": 1563657869695,
          "conversion": "urn:lla:llaPartnerConversion:94916"
        }
      ],
      "campaigns": [
        "urn:li:sponsoredCampaign:345396555"
      ],
      "name": "test conversion",
      "urlMatchRuleExpression": [
        [
          {
            "matchType": "STARTS_WITH",
            "matchValue": "www.google.com"
          }
        ]
      ],
      "lastModified": 1558369532355,
      "id": 94916,
      "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
      "urlRules": [
        {
          "matchValue": "www.google.com",
          "type": "STARTS_WITH"
        }
      ],
      "value": {
        "amount": "0",
        "currencyCode": "USD"
      },
      "account": "urn:li:sponsoredAccount:519072844",
      "key": {
        "id": 94916,
        "account": "urn:li:sponsoredAccount:519072844"
      }
    },
    {
      "postClickAttributionWindowSize": 30,
      "viewThroughAttributionWindowSize": 7,
      "created": 1558369470905,
      "imagePixelTag": "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=175804&conversionId=94908&fmt=img\" />",
      "type": "ADD_TO_CART",
      "enabled": false,
      "associatedCampaigns": [],
      "campaigns": [],
      "name": "test conversion",
      "lastModified": 1558369470905,
      "id": 94908,
      "attributionType": "LAST_TOUCH_BY_CAMPAIGN",
      "urlRules": [],
      "value": {
        "amount": "0",
        "currencyCode": "USD"
      },
      "account": "urn:li:sponsoredAccount:519072844",
      "key": {
        "id": 94908,
        "account": "urn:li:sponsoredAccount:519072844"
      }
    }
  ],
  "paging": {
  "count": 10,
  "start": 0,
  "links":[]
}
}

Update a Conversion

Use this to update your conversion. Only the field that changes needs to be specified. All fields can be modified, but should be done so with care. If you update campaigns or urlMatchRuleExpression, then all the existing items in the array need to be specified. The update replaces the whole field, rather than appending the new updated values. The header X-RestLi-Method must be included in the request and set to partial_update.

Updating a field does not change the data associated with previous conversion events. For example, changing the value of a conversion from $50 to $25 does not change the $50 value associated with conversion events for this rule that triggered previous to the change.

Sample Request

POST https://api.linkedin.com/v2/conversions/107524?account=urn%3Ali%3AsponsoredAccount%3A519072844
{
  "patch": {
    "$set": {
      "postClickAttributionWindowSize": 1,
      "viewThroughAttributionWindowSize": 1,
      "name": "test 1 last touch by campaign",
      "urlMatchRuleExpression": [
        [
          {
            "matchType": "STARTS_WITH",
            "matchValue": "www.yourdomain.com"
          },
          {
            "matchType": "CONTAINS",
            "matchValue": "/category/"
          }
        ],
        [
          {
            "matchType": "EXACT",
            "matchValue": "www.yourdomain.com/order-confirmation"
          }
        ]
      ]
    }
  }
}

Batch Partial Update

To make multiple updates in a single request, the header X-RestLi-Method must be included in the request and set to BATCH_PARTIAL_UPDATE. Conversion ids should be passed in List format shown in the examples below. Also API request requires the header X-Restli-Protocol-Version: 2.0.0.

POST https://api.linkedin.com/v2/conversions?account=urn%3Ali%3AsponsoredAccount%3A519072844&ids=List(104004,107620)
{
  "entities": {
    "104004": {
      "patch": {
        "$set": {
          "postClickAttributionWindowSize": 1
        }
      }
    },
    "107620": {
      "patch": {
        "$set": {
          "postClickAttributionWindowSize": 1,
          "urlMatchRuleExpression": [
            [
              {
                "matchType": "STARTS_WITH",
                "matchValue": "www.yourdomain.com"
              },
              {
                "matchType": "CONTAINS",
                "matchValue": "/category/"
              }
            ],
            [
              {
                "matchType": "EXACT",
                "matchValue": "www.yourdomain.com/order-confirmation"
              }
            ]
          ]
        }
      }
    }
  }
}

Sample Response

{
    "results": {
        "104004": {
            "status": 204
        },
        "107620": {
            "status": 204
        }
    },
    "errors": {}
}

Campaign Conversions

Campaign Conversions are association records between campaigns and conversions.

Create a Campaign Conversion

Sample Request

PUT https://api.linkedin.com/v2/campaignConversions/(campaign:urn%3Ali%3AsponsoredCampaign%3A337643194,conversion:urn%3Alla%3AllaPartnerConversion%3A70203)
{
  "campaign": "urn:li:sponsoredCampaign:337643194",
  "conversion": "urn:lla:llaPartnerConversion:70203"
}

A successful response returns a 204 No Content HTTP status code.

Batch Create

Multiple campaign conversions can be created with a Batch Create that accepts ids parameters each with a campaign URN and conversion URN. The campaign and conversion URNs should be passed in List format and encoded as shown in the examples below. Also API request requires the header X-Restli-Protocol-Version: 2.0.0.

Sample Request

PUT https://api.linkedin.com/v2/campaignConversions?ids=List((campaign:urn%3Ali%3AsponsoredCampaign%3A345396555,conversion:urn%3Alla%3AllaPartnerConversion%3A104004))
{
	"entities":{
		"(campaign:urn%3Ali%3AsponsoredCampaign%3A345396555,conversion:urn%3Alla%3AllaPartnerConversion%3A104004)":{
			"campaign":"urn:li:sponsoredCampaign:345396555",
			"conversion":"urn:lla:llaPartnerConversion:104004"
		}
	}
}

A successful response returns a 204 No Content HTTP status code.

Get Campaign Conversion

Sample Request

GET https://api.linkedin.com/v2/campaignConversions/(campaign:urn%3Ali%3AsponsoredCampaign%3A337643194,conversion:urn%3Alla%3AllaPartnerConversion%3A70203)

Sample Response

{
    "associatedAt": 1506552037373,
    "campaign": "urn:li:sponsoredCampaign:337643194",
    "conversion": "urn:lla:llaPartnerConversion:70203"
}

A successful response returns a 200 OK HTTP status code.

Batch Get

Multiple campaign conversion records can be requested with a Batch Get that accepts ids parameters each with a campaign URN and campaignConversions URN. The campaign and conversion URNs should be passed in List format and encoded as shown in the examples below. Also API request requires the header X-Restli-Protocol-Version: 2.0.0.

Sample Request

GET https://api.linkedin.com/v2/campaignConversions?ids=List((campaign:urn%3Ali%3AsponsoredCampaign%3A345396555,conversion:urn%3Alla%3AllaPartnerConversion%3A104004),(campaign:urn%3Ali%3AsponsoredCampaign%3A345396555,conversion:urn%3Alla%3AllaPartnerConversion%3A104012))

Sample Response

{
    "statuses": {},
    "results": {
        "(campaign:urn%3Ali%3AsponsoredCampaign%3A345396555,conversion:urn%3Alla%3AllaPartnerConversion%3A104004)": {
            "associatedAt": 1563657869695,
            "campaign": "urn:li:sponsoredCampaign:345396555",
            "conversion": "urn:lla:llaPartnerConversion:104004"
        },
        "(campaign:urn%3Ali%3AsponsoredCampaign%3A345396555,conversion:urn%3Alla%3AllaPartnerConversion%3A104012)": {
            "associatedAt": 1563657869695,
            "campaign": "urn:li:sponsoredCampaign:345396555",
            "conversion": "urn:lla:llaPartnerConversion:104012"
        }
    },
    "errors": {}
}

A successful response returns a 200 OK HTTP status code.

Find Campaign Conversions by Campaigns

All campaign conversions associated with campaign(s) can be retrieved by using the following API that takes in a list of sponsored campaign URNs in campaigns parameter. API accepts parameter q=campaigns to find campaign conversions. The campaign URNs should be passed in List format and encoded as shown in the examples below. Also API request requires the header X-Restli-Protocol-Version: 2.0.0.

Sample Request

GET https://api.linkedin.com/v2/campaignConversions?q=campaigns&campaigns=List(urn%3Ali%3AsponsoredCampaign%3A345396555,urn%3Ali%3AsponsoredCampaign%3A324175962

Sample Response


{
  "elements": [
    {
      "associatedAt": 1503516717694,
      "campaign": "urn:li:sponsoredCampaign:324175962",
      "conversion": "urn:lla:llaPartnerConversion:58980"
    },
    {
      "associatedAt": 1563657869695,
      "campaign": "urn:li:sponsoredCampaign:345396555",
      "conversion": "urn:lla:llaPartnerConversion:94916"
    },
    {
      "associatedAt": 1565302307661,
      "campaign": "urn:li:sponsoredCampaign:345396555",
      "conversion": "urn:lla:llaPartnerConversion:107604"
    },
    {
      "associatedAt": 1565300532743,
      "campaign": "urn:li:sponsoredCampaign:345396555",
      "conversion": "urn:lla:llaPartnerConversion:107596"
    },
    {
      "associatedAt": 1563657869695,
      "campaign": "urn:li:sponsoredCampaign:345396555",
      "conversion": "urn:lla:llaPartnerConversion:104012"
    },
    {
      "associatedAt": 1565387276816,
      "campaign": "urn:li:sponsoredCampaign:345396555",
      "conversion": "urn:lla:llaPartnerConversion:104004"
    }
  ],
  "paging": {
  "count": 10,
  "start": 0,
  "links":[]
}
}

Delete Campaign Conversion

Sample Request

DELETE https://api.linkedin.com/v2/campaignConversions/(campaign:urn%3Ali%3AsponsoredCampaign%3A337643194,conversion:urn%3Alla%3AllaPartnerConversion%3A70203)

A successful response returns a 204 No Content HTTP status code.

Batch Delete Campaign Conversion

Sample Request

Multiple campaign conversion records can be deleted with a Batch delete API that accepts ids parameters each with a campaign URN and campaignConversions URN. The campaign and conversion URNs should be passed in List format and encoded as shown in the examples below. Also API request requires the header X-Restli-Protocol-Version: 2.0.0.

Sample Request

DELETE https://api.linkedin.com/v2/campaignConversions?ids=List((campaign:urn%3Ali%3AsponsoredCampaign%3A345396555,conversion:urn%3Alla%3AllaPartnerConversion%3A104004),(campaign:urn%3Ali%3AsponsoredCampaign%3A345396555,conversion:urn%3Alla%3AllaPartnerConversion%3A104012))

A successful response returns a 204 No Content HTTP status code.

Report Statistics

The Conversion Tracking Reporting API (adConversionReportStatistics) has been deprecated. The adAnalyticsV2 API has been enhanced to include conversion tracking data.

Path to Conversion API Metrics

Conversion data from events such as impressions or clicks before the most recent event is now available. For example, you can query multiple impressions leading to the same conversion action instead of only the most recent action.

Prerequisites

LinkedIn supports receiving custom order IDs. Advertisers can define the conversion type they want to track by writing custom Javascript that calls the endpoint directly to register conversion actions.

You must pass cookies associated with the linkedin.com domain during the call since this process is typically handled by the insight tag, and can be verified in the request headers.

The primary URL is

https://px.ads.linkedin.com/collect/

Query Parameters

The following table details query parameters:

Parameter Description
Pid LinkedIn's insight tag ID. This parameter must be associated with at least one account.
Url (optional) This parameter uses this URL for the conversion match URL. If the parameter is missing, the default value is the referring party in the request headers. This must be URL-encoded. Ignored if conversionId is present.
Fmt The format of the query. Only img is supported.
ConversionId (optional) LinkedIn-defined ID created in Campaign Manager. If present, this parameter will ignore the url parameter and will try to attribute campaigns associated with the conversion ID found in Campaign Manager.
Oid (optional) The order ID. If present, this parameter attributes any impressions or clicks within 90 days. By making a call to an adEventWithConversion, you can fetch all events with any order IDs that lead to a conversion event. You need to create and set the order ID. This parameter is required for the Path to Conversion feature.

Implementation Examples

Placing the following examples on a web page will correctly direct an event to LinkedIn's tracking server.

The following example shows an event with both the conversionId and orderId parameters.

<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=12345&conversionId=12345&oid=12345fmt=img" />

The following example shows an event with the orderId parameter only. It relies on URL match rules defined in campaign manager.

<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=12345&oid=12345fmt=img" />

The following example shows an event with an override URL:

<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=12345&url=https%3A%2F%2Fwww.test.com&fmt=img" />

Find Ad Events by Account Order ID

To find ad events that lead to a conversion, use the adEventWithConversions API. This API requires setting q=accountOrderId and a sponsored account in the account param of the request. adEventWithConversionsreports clicks or impressions that occurred in the 90-day window preceding an external conversion action.

Sample Request

Note

Path to conversion with Find Ad Events by Account Order ID API is currently a restricted feature. Access to API is granted to select developers only.

The following table provides details for several parameters in the examples. Parameters will be joined using an AND. For example, if both account and conversion is specified, return results which has the property of both the account and conversion.

Field Type Description Example
account Sponsored Account URN The sponsored account URN that is being tracked for conversion activity. urn:li:sponsoredAccount:518772568
timeRange optional Timerange The interval during which conversion activity is being tracked. timeRange=(start:1565902152020,end:1565902152030)
orderId optional string Indicates an account with order IDs. 12345
conversion optional conversion URN Indicates conversion URN for which ad events to track. urn:lla:llaPartnerConversion:996674
campaign optional sponsored campaign URN Indicates campaign URN for which ad events to track. urn:li:sponsoredCampaign:146470284

Note

All API requests are represented in protocol 2.0.0 and require the header X-Restli-Protocol-Version: 2.0.0.

Sample Request

The following example performs a find by account.

GET https://api.linkedin.com/v2/adEventWithConversions?q=accountWithOrderId&account=urn%3Ali%3AsponsoredAccount%3A518772568

Sample Response

{ 
   "elements":[ 
      { 
         "adEventCampaign":"urn:li:sponsoredCampaign:146470284",
         "conversionEventTime":1565902152010,
         "conversionPlatform":"MOBILE",
         "adEventCreative":"urn:li:sponsoredCreative:76234674",
         "adEventTime":1565902152000,
         "adEventAttributionChannel":"LINKEDIN",
         "conversionValue":{ 
            "amount":"1.0",
            "currencyCode":"USD"
         },
         "adEventPlatform":"MOBILE",
         "conversionActionType":"PURCHASE",
         "conversionName":"my test name",
         "attributableAdEventType":"IMPRESSION",
         "conversionOrderId":"foo1",
         "account":"urn:li:sponsoredAccount:518772568",
         "conversion":"urn:lla:llaPartnerConversion:996674"
      },
      { 
         "adEventCampaign":"urn:li:sponsoredCampaign:146469994",
         "conversionEventTime":1565902152040,
         "conversionPlatform":"MOBILE",
         "adEventCreative":"urn:li:sponsoredCreative:76234674",
         "adEventTime":1565902152000,
         "adEventAttributionChannel":"LINKEDIN",
         "conversionValue":{ 
            "amount":"1.0",
            "currencyCode":"USD"
         },
         "adEventPlatform":"MOBILE",
         "conversionActionType":"PURCHASE",
         "conversionName":"my test name 4",
         "attributableAdEventType":"IMPRESSION",
         "conversionOrderId":"foo3",
         "account":"urn:li:sponsoredAccount:518772568",
         "conversion":"urn:lla:llaPartnerConversion:996618"
      },
      { 
         "adEventCampaign":"urn:li:sponsoredCampaign:146469994",
         "conversionEventTime":1565902152020,
         "conversionPlatform":"MOBILE",
         "adEventCreative":"urn:li:sponsoredCreative:76234674",
         "adEventTime":1565902152000,
         "adEventAttributionChannel":"LINKEDIN",
         "conversionValue":{ 
            "amount":"1.0",
            "currencyCode":"USD"
         },
         "adEventPlatform":"MOBILE",
         "conversionActionType":"PURCHASE",
         "conversionName":"my test name 2",
         "attributableAdEventType":"IMPRESSION",
         "conversionOrderId":"foo2",
         "account":"urn:li:sponsoredAccount:518772568",
         "conversion":"urn:lla:llaPartnerConversion:996674"
      }
   ],
   "paging":{ 
      "total":3,
      "count":10,
      "start":0,
      "links":[ 

      ]
   }
}

Sample Request

The following example performs a find using both start and end times as find criteria.

GET https://api.linkedin.com/v2/adEventWithConversions?q=accountWithOrderId&account=urn%3Ali%3AsponsoredAccount%3A518772568&timeRange=(start:1565902152020,end:1565902152030)

Sample Response

{
    "elements": [
      {
        "adEventCampaign":"urn:li:sponsoredCampaign:146469994",
        "conversionEventTime":1565902152020,
        "conversionPlatform":"MOBILE",
        "adEventCreative":"urn:li:sponsoredCreative:76234674",
        "adEventTime":1565902152000,
        "adEventAttributionChannel":"LINKEDIN",
        "conversionValue":{
           "amount":"1.0",
           "currencyCode":"USD"
        },
        "adEventPlatform":"MOBILE",
        "conversionActionType":"PURCHASE",
        "conversionName":"my test name 2",
        "attributableAdEventType":"IMPRESSION",
        "conversionOrderId":"foo2",
        "account":"urn:li:sponsoredAccount:518772568",
        "conversion":"urn:lla:llaPartnerConversion:996674"
  }
    ],
"paging": {
    "total": 1,
    "count": 10,
    "start": 0,
    "links": []
    }
}

Sample Request

The following example performs a find using end time criteria only.

GET https://api.linkedin.com/v2/adEventWithConversions?q=accountWithOrderId&account=urn%3Ali%3AsponsoredAccount%3A518772568&timeRange=(end:1565902152030)

Sample Response

{
   "elements":[
      {
        "adEventCampaign":"urn:li:sponsoredCampaign:146470284",
        "conversionEventTime":1565902152010,
        "conversionPlatform":"MOBILE",
        "adEventCreative":"urn:li:sponsoredCreative:76234674",
        "adEventTime":1565902152000,
        "adEventAttributionChannel":"LINKEDIN",
        "conversionValue":{
           "amount":"1.0",
           "currencyCode":"USD"
        },
        "adEventPlatform":"MOBILE",
        "conversionActionType":"PURCHASE",
        "conversionName":"my test name",
        "attributableAdEventType":"IMPRESSION",
        "conversionOrderId":"foo1",
        "account":"urn:li:sponsoredAccount:518772568",
        "conversion":"urn:lla:llaPartnerConversion:996674"
      },
      {
        "adEventCampaign":"urn:li:sponsoredCampaign:146469994",
        "conversionEventTime":1565902152020,
        "conversionPlatform":"MOBILE",
        "adEventCreative":"urn:li:sponsoredCreative:76234674",
        "adEventTime":1565902152000,
        "adEventAttributionChannel":"LINKEDIN",
        "conversionValue":{
           "amount":"1.0",
           "currencyCode":"USD"
        },
        "adEventPlatform":"MOBILE",
        "conversionActionType":"PURCHASE",
        "conversionName":"my test name 2",
        "attributableAdEventType":"IMPRESSION",
        "conversionOrderId":"foo2",
        "account":"urn:li:sponsoredAccount:518772568",
        "conversion":"urn:lla:llaPartnerConversion:996674"
      }
   ],
   "paging":{
      "total":2,
      "count":10,
      "start":0,
      "links":[]
   }
}