Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Every page set is owned by a Sponsored Account (advertiser) and describes a pattern (set of pages) on the advertiser’s website. If a user visits a page in this page set, the user can be added to a segment so they can be retargeted later.
Supported Methods
CREATE | GET | FINDER | PARTIAL_UPDATE
Schema
| Field Name | Type | Description |
|---|---|---|
| account | SponsoredAccountUrn (String) | The sponsored account Urn that owns this page set. |
| changeAuditStamps | ChangeAuditStamps | Audit change stamps including creation timestamp and last updated timestamp |
| id | optional long | The synthetic key for this AdPageSet. |
| matchRules | optional AdUrlMatchRule[] | These AdUrlMatchRules are logically OR'ed define the membership of this AdPageSet. Each AdUrlMatchRule represents a matcher function which is used to test whether the Url associated with an incoming user page view event belongs in this pageset. If this field contains an empty array the adPageSet will NOT match against any URLs, if this field is null then the adPageSet will match against ALL URLs. |
| name | string | A short name for this page set, e.g. 'Homepage', meant to be displayed in a UI. |
| versionTag | optional string | Version number of ad Page Set. |
| urlMatchRuleExpression | optional AdUrlMatchRuleExpression | 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) |
Note
field urlMatchRuleExpression will replace the field matchRules. While the field matchRules is still allowed for this moment, we would suggest and all examples in our api are using the field urlMatchRuleExpression.
AdUrlMatchRule
| Field Name | Type | Description |
|---|---|---|
| matchType | AdUrlMatchRuleType | The type field determines how the matchValue field is used to match URLs. |
| matchValue | string | The string to match URLs against according to the matchType. This field does not necessarily contain a well-formed URL. By design, matchValues cannot distinguish between URL protocols 'http://example.com/page' and 'https://example.com/page' are equivalent matchValues) or the 'www.' subdomain prefix 'www.example.com' and 'example.com' are equivalent matchValues). |
AdUrlMatchRuleType
| Enum | Description |
|---|---|
| EXACT | Matches if the URL and the match value are exactly the same. |
| STARTS_WITH | Matches if the URL starts with the matchValue. |
| CONTAINS | Matches if the URL contains the matchValue at any location. |
AdUrlMatchRuleExpression
Reference Type: AdUrlMatchRuleAndOperands[]
AdUrlMatchRuleAndOperands
Reference Type: AdUrlMatchRule[]
CREATE
POST https://api.linkedin.com/v2/adPageSets
Parameters
| Field Name | Type | Description |
|---|---|---|
| account | SponsoredAccountUrn (String) | The sponsored account Urn that owns this page set. |
| name | string | A short name for this page set, e.g. 'Homepage', meant to be displayed in a UI. |
| matchRules | optional AdUrlMatchRule[] | These AdUrlMatchRules are logically OR'ed define the membership of this AdPageSet. Each AdUrlMatchRule represents a matcher function which is used to test whether the Url associated with an incoming user pageview event belongs in this pageset. If this field contains an empty array the adPageSet will NOT match against any URLs, if this field is null then the adPageSet will match against ALL URLs. |
| urlMatchRuleExpression | optional AdUrlMatchRuleExpression | 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) |
Sample request
{
"account": "urn:li:sponsoredAccount:$accountId",
"urlMatchRuleExpression": [
[
{
"matchType": "EXACT",
"matchValue": "foo"
}
]
],
"name": "TestPageSet"
}
GET
GET https://api.linkedin.com/v2/adPageSets/{id}
Example
GET https://api.linkedin.com/v2/adPageSets/10101
Sample response
{
"account": "urn:li:sponsoredAccount:$accountId",
"created": 1461779273000,
"id": 10101,
"lastModified": 1461779273000,
"name": "TestPageSet",
"versionTag": "1",
"urlMatchRuleExpression": [
[
{
"matchType": "EXACT",
"matchValue": "foo"
}
]
]
}
FINDER
GET https://api.linkedin.com/v2/adPageSets?q=account
Parameters
| Field Name | Type | Description |
|---|---|---|
| account | SponsoredAccountUrn | Page sets associated with this ads account |
Example
GET https://api.linkedin.com/v2/adPageSets?q=account&account=urn:li:sponsoredAccount:500605635
Sample Response
{
"elements": [
{
"account": "urn:li:sponsoredAccount:$accountId",
"created": 1461277669000,
"id": 10052,
"lastModified": 1461277669000,
"urlMatchRuleExpression": [
[
{
"matchValue": "foo",
"matchType": "EXACT"
}
]
],
"name": "TestPageSet",
"versionTag": "1"
}
]
}
PARTIAL UPDATE
POST https://api.linkedin.com/v2/adPageSets/{id}
Example
POST https://api.linkedin.com/v2/adPageSets/10101
Sample request
{
"patch": {
"$set": {
"account": "urn:li:sponsoredAccount:$accountId",
"id": 10101,
"name": "TestPageSetUpdated",
"urlMatchRuleExpression": [
[
{
"matchType": "EXACT",
"matchValue": "foo"
}
]
]
}
}
}