Create a campaign tracking link
create_campaign_linkCreate a web-to-app tracking link for an ad campaign and return the tracking_url to place in the ad; use the App Store destination URL as the user's final destination.
Instructions
Create a web-to-app tracking link for an ad campaign. Requires a write-scoped API key. Returns the link: tracking_url is the campaign link to use in the ad (for meta the ad's Website URL, for tiktok the ad's destination, for google the tracking template with the App Store URL kept as the final URL); url is only the App Store destination you passed, never the link to put in an ad. tracking_url is null when the server has no link origin configured or the network is unrecognized; then create the link in AttriKit, Links.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | The app id the link belongs to. | |
| network | Yes | The ad network delivering the campaign. | |
| campaign_id | No | Optional EXISTING AttriKit campaign uuid (from list_campaigns) to attach this link to. Not the ad network's id: use network_campaign_id for that. Pass one or the other, not both. | |
| campaign_name | No | Optional human-readable campaign name. | |
| serve_landing | No | Serve the landing bridge on this link. Defaults to true at the API. | |
| destination_url | Yes | The App Store URL to send users to. | |
| idempotency_key | No | Stable retry key for this exact mutation. | |
| network_campaign_id | No | The AD NETWORK's own campaign id (for Meta, the campaign ID in Ads Manager, which exists as soon as the campaign is saved, even as a draft). pull_network_spend matches report rows on it, so set it on every link whose spend you will pull: a link created without it can never match. Create the network campaign first, then the link, then paste the link into the ad. |