Our SDKs use this HTTP Tracking API. If you want to build your own, read below.
To track events through Woopra, you must send
GET requests to the following endpoint.
GET Request Parameters
Below you’ll find the list of all require and publicly supported tracking parameters.
|host||required||Identifies which project environment your sending this tracking request to.|
|cookie||required||A unique identifier (32-char max, ~12-chars optimal) for the customer or their device. It recommended to use a hash of the email to keep it consistent across multiple devices. Every new cookie will generate a new visit.|
|referer||optional||Visit’s referring URL, Woopra servers will match the URL against a database of referrers and will generate a referrer type and search terms when applicable. The referrers data will be automatically accessible from the Woopra clients.|
|cv_*||optional||Custom visitor data parameters. e.g. cv_name, cv_email etc…|
|event||required||Custom event type. e.g. event=purchase, event=signup etc…|
|ce_*||optional||Custom event data parameters. e.g. ce_name, ce_amount etc…|
|ip||optional||IP address of the visitor. If defined, it overrides the physical IP address of the connection.|
|timeout||optional||In milliseconds, defaults to 30000 (equivalent to 30 seconds) after which the event will expire and the visit will be marked as offline.|
|browser||optional||User’s browser. If defined, it overrides the auto-detected browser from the user-agent. You can also build your custom user-agent|
|os||optional||User’s operating system. If defined, it overrides the auto-detected operating system from user-agent.|
|device||optional||User’s operating system. If defined, it overrides the auto-detected operating system from user-agent.|
Tracking Request Example
http://www.woopra.com/track/ce/ ?host=mywebsite.com &response=json &cookie=AH47DHS5SF182DIQZJD &timeout=300000 &cv_name=John+Smith &firstname.lastname@example.org &event=purchase &ce_item=Coffee+Machine &ce_category=Electric+Appliances &ce_sku=K5236532
There is no limit on the number of the parameters, as long as your browser can handle the length of the resulting GET request.
Values in the GET request are not escaped in the example above to make it better readable, make sure to escape them.
It is recommended to use non-blocking http clients, especially for high volume traffic.
Your http client should be able to handle 301, 302 redirects, and should preferably handle cookies.
Custom Visitor Data
Woopra allows you to store custom visitor data of your choice; custom parameters have to be prefixed by
cv_ to be tracked correctly.
For example, to log a John Smith, email being email@example.com you will have to issue the following request:
http://www.woopra.com/track/ce/ ?host=mywebsite.com &response=json &cookie=AH47DHS5SF182DIQZJD &timeout=300000 &cv_name=John+Smith &firstname.lastname@example.org ...
Custom Event Data:
In addition to custom visitor data, Woopra allows tracking custom events; the event properties have to be prefixed by
ce_ to be tracked correctly. It is highly advised to define the ‘event’ in the request, and as many related properties as possible to unlock the reporting capabilities.
For example, to track a
John Smith of
$149.95 for a
Titanium package, you should issue a tracking request similar to the following
http://www.woopra.com/track/ce/ ?host=mywebsite.com &response=json &cookie=AH47DHS5SF182DIQZJD &timeout=300000 &cv_username=John+Smith &email@example.com &event=payment &ce_amount=149.95 &ce_type=blog &ce_package=Titanium
For pageview-based tracking, it is recommended that ce_url is used for the page path, and ce_title is used for the page title. This will integrate seamlessly with the Woopra clients. If the variable names are defined otherwise, then custom analytics should be created to collect the corresponding data.
It is possible to override the default action’s timestamp by sending a ‘timestamp’ parameter (previously ce_timestamp) in the GET request; timestamp is the unix time in milliseconds. This is particularly useful for importing data
Optionally, ping requests can be periodically sent to Woopra servers to refresh the visitor timeout counter. This is used if it’s important to keep a visitor status ‘online’ when she’s inactive for a long time (for cases such as watching a long video).
http://www.woopra.com/track/ping/ ?host=mywebsite.com &response=json &cookie=AH47DHS5SF182DIQZJD &timeout=300000
- There is no need to have custom parameters in the ping request.
- It is recommend to send ping requests at intervals slightly less than the timeout value. If the timeout is 60 seconds, consider pinging the servers every 55 seconds, otherwise you will be sending unnecessary requests.