Retrieving Session Data Using an API

YouAsked

Recently, a customer asked how to add a link within a Zingtree so that their home-grown support system could retrieve the click history for the current session. Great question! Here’s how to do it:

1. We offer an API link to retrieve session data in a text format.  You just need to pass it a session ID. The URL looks like this:

http://zingtree.com/api/get-session-data.php?session_id=Gallery53-14464951629411

2. Within Zingtree, you can insert the current session ID into any node’s contents using the string #session#.

So to include a link to open a text page with all the current session info, you could add this HTML into your node:

<a href="http://zingtree.com/api/get-session-data.php?session_id=#session#" target="_blank">Click here for session data</a>

Armed with this information, a programmer could make something to incorporate Zingtree session data into any custom support or CRM system.

Update October 15, 2015: If you’re looking to get session data in a more human readable form, use this API URL instead:

http://zingtree.com/deploy/session-detail.php

Here’s an example, with live data from one of our Gallery sessions:

http://zingtree.com/deploy/session-detail.php?session_id=Gallery53-14464951629411

3 Trackbacks

Leave a Reply

Your email address will not be published. Required fields are marked *