POST /conversion.json

Description: Creates a new Goal Conversion attached to a previous visitor to your website. This method is commonly used to record recurring bills or offline sales.

API Endpoint URL: https://api.improvely.com/v1/conversion.json

Attribute Required Default Description
key Your API key
project The ID number of the Improvely project to record this conversion within. You can retrieve this number from the top of the Project Settings page of the relevant project in your account.
label See Note Label previously assigned to the visitor profile using the Visitor Labeling feature.
previous_reference See Note The reference value of a previous conversion completed by the same visitor.
subid See Note For affiliate network postbacks: the subid value associated with the conversion.
ip See Note IP address of the visitor that converted.
user_agent See Note Complete HTTP user agent string of the visitor that converted.
goal Conversion The name of the conversion goal that was completed (e.g. lead, sale).
revenue 0 The amount of revenue associated with the conversion. This should be numeric with no currency symbols or thousands separator.
reference Additional information to attach to the conversion, like an order number or customer e-mail.
date Now The UNIX timestamp corresponding to the date and time the conversion event occurred. If not provided, the current time will be used.
notify false Boolean (‘true’ or ‘false’) indicating whether you want to generate e-mail notification(s) for this new conversion to any users subscribed to the associated project.

Important Notes: Either a visitor label, IP and user-agent pair, previous reference or subid value must be specified in order to identify which visitor profile to attach this conversion to. If no profile can be found, the conversion will not be created. This API cannot be used to record arbitrary events that are not linked to a previous website visitor. The project attribute is required unless a subid is specified.

Example request:

curl https://api.improvely.com/v1/conversion.json \
  -X POST \
  -d 'key=90c0d64fds653338as6869e54267e05&project=1&previous_reference=54321&goal=Subscription+Renewal&revenue=29&reference=54321+Renewal+9/26&date=1411694111&notify=false'

Example successful response (HTTP status code 200):

{
    "status": "success"
}

Example failure response (HTTP status code: 400):

{
    "status": "error",
    "type": "parameters",
    "message": "Missing required parameter: `label`, `ip` and `user_agent`, `previous_reference` or `subid`."
}

More from this category
Conversion tracking and click fraud monitoring for all your marketing.   Start a Free Trial