Creates a new tracking link.
Account Limit for Vanity Links
Up to 5000 vanity links can exist in your account. Attempting to create more vanity links when at the limit will return
403 Forbidden
and the link will not be created. Delete unused vanity links if at the limit.
Parameters
ProgramId
required
ProgramId
requiredUnique identifier for the program that the tracking link will be in. Specified in the API call path.
Type
optional
Type
optionalSpecifies the type of tracking link.
View possible enum value | |
---|---|
Regular | Creates a standard tracking link, which automatically generates a URL path. |
Vanity | Creates a vanity tracking link, which enables a custom path in the URL to be specified. |
CustomPath
optional
CustomPath
optionalDefines the custom path of the tracking link after the domain, which will turn a standard tracking link into a vanity tracking link (e.g., specifying CustomPath=MyCustomLink
becomes https://example.sjv.io/MyCustomLink
). If omitted, a random path will be generated.
AdId
optional
AdId
optionalSpecify the unique ad identifier you're creating a tracking link for. If omitted, the tracking link will redirect to the brand's program's landing page instead of the page specified by the ad.
DeepLink
optional
DeepLink
optionalSpecify the exact URL that the tracking link will redirect a user to. If omitted, the tracking link will redirect to your program's default landing page.
MediaPartnerPropertyId
optional
MediaPartnerPropertyId
optionalSpecify the unique identifier of the partner's media property (i.e., website, social media profile, or app) where the link will be used.
subId1
optional
subId1
optionalSpecify a sub-affiliate ID value—this will appear in your partner performance reporting. Brands will not be able to see this value in their reporting.
subId2
optional
subId2
optionalSpecify a sub-affiliate ID value—this will appear in your partner performance reporting. Brands will not be able to see this value in their reporting.
subId3
optional
subId3
optionalSpecify a sub-affiliate ID value—this will appear in your partner performance reporting. Brands will not be able to see this value in their reporting.
sharedId
optional
sharedId
optionalSpecify a shared ID value—this will appear in your partner performance reporting.
Example request
curl 'https://api.impact.com/Mediapartners/<AccountSID>/Programs/<ProgramId>/TrackingLinks?MediaPartnerPropertyId=1892978&DeepLink=https%3A%2F%2Fexample.com%2Fmysite%2F&Type=vanity&subId1=test&sharedId=test2 \
-X POST \
-u '<AccountSID>:<AuthToken>' \
-H 'Accept: application/json'
Returns
Returns the URL of the generated tracking link. Will return 403 Forbidden
if 5000 tracking links exist.
Example response
{
"TrackingURL": "https://example.sjv.io/c/123456/98765/101010"
}
{
"timestamp": 1663261677313,
"status": "BAD_REQUEST",
"error": "Bad Request",
"message": "The property ID '123456' does not exist."
}