Create a tracking link

Creates a new tracking link for the specified media partner.

Parameters


ProgramId required

Unique identifier for the program that the tracking link will be in. Specified in the API call path.


MediaPartnerId required

Unique identifier for the media partner that will be assigned the tracking link. Specified as a query string parameter in the API call path.


Type optional

Specifies the type of tracking link.

View possible enum value
RegularCreates a standard tracking link, which automatically generates a URL path.
VanityCreates a vanity tracking link, which enables a custom path in the URL to be specified.

CustomPath optional

Defines 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

Specify the unique ad identifier you're creating a tracking link for. If omitted, the tracking link will redirect to your program's landing page instead of the page specified by the ad.


DeepLink optional

Specify 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

Specify the unique identifier of the partner's media property (i.e., website, social media profile, or app) where the link will be used.

Example request


curl 'https://api.impact.com/Advertisers/<AccountSID>/Programs/<ProgramId>/TrackingLinks?MediaPartnerId=<MediaPartnerId>' \
  -X POST \
  -u '<AccountSID>:<AuthToken>' \
  -H 'Accept: application/json'

Returns


Returns the URL of the generated tracking link.

Example response


{
    "TrackingURL": "https://example.sjv.io/c/123456/98765/101010"
}