Page tree

 

Contents

Evergage can also receive events via HTTP requests from backend servers or other services. This API is simple enough to be used with any HTTP client library.

Event HTTP Request Format Requirements

HTTP's GET and POST request methods are supported. GET is recommended for ease of use. 

For POST requests, content-type=application/x-www-form-urlencoded must be used (content-type=multipart/form is not supported).


Request Parameters

Each HTTP request represents a single event. Request parameters are interpreted as event fields. Fields beginning with an underscore ("_") are reserved for metadata that are used in event processing. All other parameters will be stored in the dataset. Events sent to the httpreceiver endpoint can have arbitrary parameters and values, but must always include the account key ("_ak") and dataset (“_ds”) parameters. The event may also optionally include a “_time” parameter that sets the timestamp of the event in epoch milliseconds. If not included, the system will assign the current time as the event's timestamp.

ParameterTitleOptional?Description
_akEvergage account ID Identifier of your account in Evergage (same as your subdomain .evergage.com).
_dsEvergage dataset ID Identifier of your dataset in Evergage
_timeEvent timeOptionalEvent timestamp in epoch milliseconds. Optional–if omitted, current time is used.
userIdID of the user ID of the named user to associate with this event
companyCompany/account of userOptionalFor datasets tracking accounts, this identifies which account the user belongs to. If omitted, user's existing account association will be used.
actionAction name Name of the action that the user just took.
<custom>Custom attributeOptionalSpecify any additional custom attributes for the user or account that you wish to set.


Endpoint Address, Transport & Response Detail

Event HTTP requests should use the path of your account-specific httpreceiver endpoint, which is:

https://<account-key>.evergage.com/httpreceiver

It is recommended to use HTTPS (SSL) when possible, but plaintext HTTP is also accepted. Events received successfully will get an HTTP response status code of 200. If there is a problem with the message, such as a missing dataset parameter, a 400 error code will be returned.

 
Character Encoding, URI Encoding

For best results:

  • Prepare your Event data in UTF-8
  • For POST requests, explicitly declare UTF-8 as the request's character encoding:
    Content-type: application/x-www-form-urlencoded; charset=UTF-8
  • For GET and POST requests, perform URI encoding on all parameter names and values using UTF-8.
  • If you are using an HTTP client library (e.g. Apache HttpClient, Ruby's rest-client etc.), check the default behavior to ensure you are not double-encoding.

This page has no comments.