Import/Export API

Important: Read the introduction before proceeding.

Import API

The Import API allows importing a list of visits into woopra. The visits can then be seamlessly accessed in reporting, visitor profiles, schemas, labels…

Details

As described in the HTTP tracking API, events can be pushed into woopra with custom timestamps, simply by adding a unix timestamp (in Milliseconds) to the tracking request.

Example:


http://www.woopra.com/track/ce/
 
?host=mywebsite.com
&id=john@mail.com
&response=json
&cookie=AH47DHS5SF182DIQZJD
&timeout=300000
&cv_username=John+Smith
&cv_email=john@mail.com
&event=purchase
&ce_amount=149.95 
&timestamp=1381968226977

Important:

  • The imported data will be permanently written to the system, and the operation cannot be rolled back.

Export API

Exports the raw list of visits.

Endpoint

https://www.woopra.com/rest/2.4/logs/export

Parameters

Name Description
website The project name as registered in Woopra
cursor The relative name of the log file ex: -1 is the previous log archive, 0 is the current log file, etc…
pos (Advanced) Used for paging; The position of the log file, required when ‘cursor’ is 0. The value of the next ‘pos’ is retrieved by making an initial request with pos=0, and retrieving the new pos from the HTTP response Header: X-Woopra-Pos

Example (command line):

curl --user appID:secretKey 'https://www.woopra.com/rest/2.4/logs/export?website=mybusiness.com&cursor=-2' > two-days-ago.log

Example (browser):

https://www.woopra.com/rest/2.4/logs/export
?website=mybusiness.com
&cursor=-7
&access-secret=Z6iwneq...
&access-id=NI09...

Output:

{"date":"2014-03-20","country":"US","os":"Win","city":"Los Angeles","ip":"99.141.29.9","language":"English","pid":"rpE...
{"date":"2014-03-20","country":"UK","os":"Win","city":"London","ip":"99.188.29.9","language":"English","pid":"nXe...
{"date":"2014-03-20","country":"US","os":"Mac","city":"San Francisco","ip":"101.11.9.18","language":"English","pid":"nTu...
...

Important

The JSON parser should be able to process inserts and deletes. When a visitor is deleted, the visit log will have the following properties:

  • type: system
  • method: delete

It should be handled by deleting the visitor and their previous visits with the profile ID (pid).

Do you know what your customers are doing?
Find out in 5 minutes.

Try Woopra for free. No credit cards. No obligations.

Start for free