The Performable HTTP API is very simple. You request a URL from our tracking servers that contains various query parameters.
|All parameters must be properly URL-escaped (such as replacing spaces with + or %20). Most programming languages provide libraries to do this for you.|
You must make your requests against analytics.performable.com using GET. Both HTTP and HTTPS are supported.
To record an event you must make a request to our tracking API with the path /v1/event. There are three additional required parameters:
- _a - Your Performable API key. (Your API Key can be found in Account Settings within your Performable account.)
- _n - The EVENT_ID of the event you want to record. You can get an event id in two ways:
- Log into your Performable account, click Setup, and then click on the event that you wish to record. Finally, click the configuration link to bring up a dialog which shows you the event id.
- Use your own unique label as the id, and Performable will automatically generate the corresponding event in your account. You can rename it from within the app later if you'd like.
There are also optional parameters:
- _t - The timestamp of the event (in seconds as a UTC Unix epoch). By default this is ignored - it is used only to help make requests unique and the time that our servers receive the event is used for the timestamp of the event.
- _d - If equal to the string true, implies that the timestamp sent with this event should be used as the time of completion for this event. The timestamp will be ignored if it represents a future date (within some reason), or is more than a few years old. Servers generating timestamps should use some mechanism (like NTP) for syncing clocks to a reasonable standard. The API expects timestamps are in seconds, but may detect timestamps in milliseconds and attempt to resolve them to seconds.
- _l (that's a lowercase L) - The URL that triggered this event.
- _ip - The IP address of the user who completed this event. This is useful if you want Performable to assign location data to a user based on their IP address.
If you are recording an e-commerce transaction you may use any of the following parameters:
- value - A monetary value associated with this event, such as the purchase amount or expected conversion value. This value should be a number with no formatting other than a period representing the decimal point (if necessary.)
- order_id - A unique identifier associated with the order or transaction. This is used to make sure this transaction is not counted more than once.
You can record any other arbitrary properties that you might want associated with this user and event. For example, you could include the name of the e-mail variation if you are split testing different e-mail messages, or an additional property about the user that you want attached to their Performable profile. These properties will also be reported on in some of our Analytics products and can be sent to Webhooks in Engage.
It is important to note that for any given user and property name, only the latest value will be stored.
To record that the user andrew did the EVENT_ID and his plan was business you would request the following URL:
To record that the user firstname.lastname@example.org did the EVENT_ID and his plan was business you would request the following URL:
Please read our page on Identifying Users for other useful parameters accepted in the HTTP API.