POST /link.json
Description: Creates a new Tracking Link. Tracking links keep track of clicks from ads or other marketing efforts, track their costs, and monitor clicks for signs of click fraud.
API Endpoint URL: https://api.improvely.com/v1/link.json
Attribute | Required | Default | Description |
---|---|---|---|
key | Your API key | ||
project | The ID number of the Improvely project to create this link within. You can retrieve this number from the top of the Project Settings page of the relevant project in your account. | ||
url | The landing page URL this link will redirect to when clicked. | ||
campaign | Campaign name (e.g. Google Ads, Spring Sale, TV Spot). | ||
source | Source (e.g. Google, Microsoft AdCenter). | ||
medium | Medium (e.g. PPC, E-mail, Banner). | ||
content | Ad content (e.g. Free Shipping Offer). | ||
cost_type | PPC | Must be one of these strings: “PPC”, “one-time” or “monthly”. | |
cost | 0 | The monetary cost associated with the ad. This attribute should be numeric with no currency symbol or thousands separator. | |
custom_url | Custom tracking URL (e.g. https://example.iljmp.com/1/customurl). Letters, numbers and dashes only; no spaces or special characters. |
Example request:
curl https://api.improvely.com/v1/link.json \ -X POST \ -d 'key=90c0d64fds653338as6869e54267e05&project=1&url=http%3A%2F%2Fwww.example.com&campaign=Google+AdWords&medium=PPC&source=Product+Listing+Ads&content=Natural+Skincare&cost_type=PPC&cost=0.50&custom_url=skincare1'
Example successful response (HTTP status code 200):
{ "status": "success", "google": { "short_link": "https://awio.iljmp.com/1/skincare1?kw={keyword}", "direct_link": "http://www.example.com/?ims=skincare1&kw={keyword}" }, "bing": { "short_link": "https://awio.iljmp.com/1/skincare1?kw={keyword}", "direct_link": "http://www.example.com/?ims=skincare1&kw={keyword}" }, "7search": { "short_link": "https://awio.iljmp.com/1/skincare1?kw=###KEYWORD###", "direct_link": "http://www.example.com/?ims=skincare1&kw=###KEYWORD###" }, "anywhere": { "short_link": "https://awio.iljmp.com/1/skincare1", "direct_link": "http://www.example.com/?ims=skincare1" } }
Example failure response (HTTP status code: 400):
{ "status": "error", "type": "parameters", "message": "Missing required parameter: `campaign`." }