Developer: How to send additional custom information in sessions

Signup for a free 18-days trial today

Developer: How to send additional custom information in sessions

In Knowledge base >

You are able to send additional data with the session created, that will only be seen by operators. This is very useful in situations where you need more information about the user than just their name/email.

In your javascript tag, add before </script> the variable cs_custom_data (required) with a JSON presentation (name/value pair) of the custom data you wish being added to the session. See the example below:

<script type="text/javascript">
		var scrs=d.getElementsByTagName("script");var scr=scrs[scrs.length-1];var e=d.createElement("script");e.async=true;e.src=("https:"==document.location.protocol?"https://":"http://")+""+scrs.length;
		if(typeof c=="function")if(e.addEventListener)e.addEventListener("load",c,false);else if(e.readyState)e.onreadystatechange=function(){if(this.readyState=="loaded")c();};
	// Below is the additional information in JSON presentation
	var cs_custom_data={"User ID":"21234","Website":"","Notes":"Returning customer"};

This will show up in the INFO pane in the administration backend, or when you ask #info from the Jabber bots.

Remember to escape the data correctly.

Note: Not supported in IE7 or below.
Restrictions: You will be able to send up to 3 rows, with keys up to 20 characters and values up to 500 characters. This might change in the future, so if you need further information or other setup please contact us.

Related entires

View all