Custom Redirect Object
Track links on your website or third-party site with Account Engagement’s custom redirects. For example, you can track a link on your Twitter page or a banner ad on a third-party site. When a user clicks a link, a corresponding activity is created on their profile. Learn about custom redirects in Salesforce Help.
The API to access Custom Redirects follows the conventions described in Version 5 Overview.
Include the authentication header with every request. For information on how to authenticate, see Authentication.
Operation | Verb | URL Format | Ability Requirements |
---|---|---|---|
Read | GET | https://pi.pardot.com/api/v5/objects/custom-redirects/<id>?<params> | Marketing > Content > Custom Redirects > View ability |
Create | POST | https://pi.pardot.com/api/v5/objects/custom-redirects?<params> | Marketing > Content > Custom Redirects > Create/Edit ability |
Update | PATCH | https://pi.pardot.com/api/v5/objects/custom-redirects/<id>?<params> | Marketing > Content > Custom Redirects > Create/Edit ability |
Delete | DELETE | https://pi.pardot.com/api/v5/objects/custom-redirects/<id> | Marketing > Content > Custom Redirects > Delete ability |
Query | GET | https://pi.pardot.com/api/v5/objects/custom-redirects?<params> | Marketing > Content > Custom Redirects > View ability |
Required Editable Fields
Field | Type | Description |
---|---|---|
name | String | Name of the object for identification in Account Engagement. |
campaignId | Integer | Account Engagement Campaign related to this object. |
destinationUrl | String | A fully qualified URL. The visitor who clicks the custom redirect will be directed to this location. E.g. https://example.com/content.html |
Optional Editable Fields
Field | Type | Description |
---|---|---|
folderId | Integer | ID of the folder containing this object. Uses the asset type's uncategorized folder if not specified on create. |
trackerDomainId | Integer | ID of the tracker domain to use in the URL for this object. Uses the primary tracker domain for the account if not specified on create. |
vanityUrlPath | String | Vanity URL path (excluding protocol and host). Must be unique for each tracker domain. E.g. /my-link . The value assumes empty (/ ) if not specified on create. |
Optional Google Analytics Fields
The following fields are only available if a Google Analytics connector is present. For more information, see the Google Analytics documentation.
Field | Type | Description |
---|---|---|
gaSource | String | Campaign source |
gaMedium | String | Campaign medium |
gaTerm | String | Campaign keyword |
gaContent | String | Campaign content |
gaCampaign | String | Campaign ID |
Read-Only Fields
Field | Type | Description |
---|---|---|
id | Integer | ID of the object. |
salesforceId | String | Salesforce Id of the object. |
vanityUrl | String | Fully qualified vanity URL. Includes tracker domain and vanityUrlPath. E.g. https://mytracked.example.com/my-link |
trackedUrl | String | Fully qualified tracked URL. Does not include Vanity URL |
bitlyIsPersonalized | Boolean | True if a custom Bitly URL was set |
bitlyShortUrl | String | If set, a fully qualified Bitly URL |
isDeleted | Boolean | True if the object is in the recycle bin in Account Engagement. |
createdAt | DateTime | Creation time of the object. |
updatedAt | DateTime | Last update time of the object. |
createdById | Integer | ID of the user who created this object. |
updatedById | Integer | ID of the user who last updated this object. |
createdBy | User | User object representing the user who created this object. See documentation for User for fields. |
updatedBy | User | User object representing the uer who last updated this object. See documentation for User for fields. |
trackerDomain | TrackerDomain | Tracker Domain object representing the tracker domain that was set on Create. See documentation for Tracker Domain for fields. A null value indicates that the object will use the default tracker domain for the account. |
campaign | Campaign | Campaign object representing the campaign that was set on Create. See documentation for Campaign for fields. |
folder | Folder | JSON object representing the folder for this object. See documentation for Folder for fields. |
A custom redirect POST request must have a JSON body with all required fields specified, as described in the Version 5 Overview.
Example request:
Example response
This example does not show all headers, and whitespace has been added to make it easier to read.
The fields in the response body and Location
header are the same as the fields specified on the example request.
Updating a custom redirect follows the conventions described in the Version 5 Overview.
Deleting a custom redirect follows the conventions described in the Version 5 Overview.
Retrieving a collection of custom redirects follows the conventions described in Version 5 Overview.
Sortable Fields
When executing a query, the following fields can be specified in the orderBy
parameter. See the conventions for query described in the Version 5 Overview.
id
Example request:
Example response:
Filtering Results
When executing a query, the following parameters can be used to filter the returned results. These parameters can be specified in the request along with any shared parameters defined in Version 5 Overview. When specifying more than one parameter, all parameters must match the record in order for it to be returned in the results.
Parameter | Description |
---|---|
id | Returns any custom redirects where ID is equal to the given integer value. |
idGreaterThan | Returns any custom redirects where ID is greater than the specified value, non-inclusive. |
idGreaterThanOrEqualTo | Returns any custom redirects where ID is greater than or equal to the specified value. |
idLessThan | Returns any custom redirects where ID is less than the specified value, non-inclusive. |
idLessThanOrEqualTo | Returns any custom redirects where ID is less than or equal to the specified value. |
deleted | Determines whether to return deleted records. The value can be false (default), true , or all . |
Example request:
Example response: