POST /project.json
Description: Creates a new project in your Improvely account, and returns the project’s ID and code snippet for integration. A project typically represents one website you are using Improvely to track visits and conversions on.
API Endpoint URL: https://api.improvely.com/v1/project.json
Attribute | Required | Default | Description |
---|---|---|---|
key | Your API key | ||
name | The name of the project. | ||
currency | $ | The currency symbol to display in reports. Valid values: “$” (dollar), “€” (Euro), “£” (Pound Sterling), “¥” (Japanese Yen), “₹” (Indian Rupee). | |
google_url_compatibility | false | Boolean (“true” or “false”) indicating whether to enable the Google Analytics URL Compatibility option, which instructs Improvely to treat links tagged with UTM parameters as ad clicks and to add UTM parameters to new tracking links. | |
track_organic | true | Boolean (“true” or “false”) indicating whether to enable tracking of organic and search traffic. If set to false, only ad clicks will be recorded for this project. | |
max_clicks | 0 | The maximum number of ad clicks allowed from a single person in a 24 hour period before the visitor is warned and an alert is generated. Set to 0 to disable click fraud monitoring for this project. | |
fraud_message | The warning message to display to someone who has clicked ads more than `max_clicks` times. | ||
goal_mode | all | Set to “all” to count all conversions. Set to “one” to count only one conversion per person for each goal type. | |
attribution_model | firstad | Sets the conversion attribution model.
“first” for first-click attribution. |
|
duplicate_filter | false | Boolean (“true” or “false”) to enable or disable the duplicate conversion filter. This filter removes conversions sent to Improvely with the same reference value as any previous conversion. |
Example request:
curl https://api.improvely.com/v1/project.json \ -X POST \ -d 'key=90c0d64fds653338as6869e54267e05&name=My+Store¤cy=$&google_url_compatibility=true&track_organic=true&max_clicks=5&fraud_message=You%20have%20been%20detected%20clicking%20this%20ad%20more%20than%205%20times%20in%20the%20past%2024%20hours.%20This%20information%2C%20including%20your%20IP%20address%20and%20geographic%20location%2C%20has%20been%20logged%20and%20sent%20to%20the%20owner%20of%20this%20ad.&goal_mode=all&attribution_model=firstad&duplicate_filter=false'
Example successful response (HTTP status code 200):
{ "status": "success", "id": 3, "website_code": "<script type=\"text/javascript\">\r\nvar im_domain = 'example';\r\nvar im_project_id = 3;\r\n(function(e,t){window._improvely=[];var n=e.getElementsByTagName(\"script\")[0];var r=e.createElement(\"script\");r.type=\"text/javascript\";r.src=\"https://\"+im_domain+\".iljmp.com/improvely.js\";r.async=true;n.parentNode.insertBefore(r,n);if(typeof t.init==\"undefined\"){t.init=function(e,t){window._improvely.push([\"init\",e,t])};t.goal=function(e){window._improvely.push([\"goal\",e])};t.label=function(e){window._improvely.push([\"label\",e])}}window.improvely=t;t.init(im_domain,im_project_id)})(document,window.improvely||[])\r\n</script>" }
Example failure response (HTTP status code: 400):
{ "status": "error", "type": "parameters", "message": "Invalid parameter value: `track_organic`." }