Developers
The following information is for developers of Woopra third-party applications.
JavaScript Developer Guide
The Woopra system is developed to not only gather traditional data presented by Web servers such as referrer, system type, and location data, it can also accept non-traditional input presented in real time within in the Woopra client to add value when interpreting individual events.
Some of the additional input currently accepted include:
- Visitor’s name
- Visitor’s e-mail
- Link to visitor’s avatar
There are two types of data that can be transferred using JavaScript to the Woopra Servers:
Using the two types of data, an example would be:
<script type="text/javascript">
var woopra_visitor = new Array();
var woopra_event = new Array();
woopra_visitor['key1'] = 'value1';
woopra_visitor['key2'] = 'value2';
...
woopra_visitor['keyN'] = 'valueN';
woopra_event['key1'] = 'value1';
woopra_event['key2'] = 'value2';
...
woopra_event['keyN'] = 'valueN';
var _wh = ((document.location.protocol=='https:') ? "https://sec1.woopra.com" : "http://static.woopra.com");
document.write(unescape("%3Cscript src='" + _wh + "/js/woopra.js' type='text/javascript'%3E%3C/script%3E"));
</script>
Woopra Visitor Data: woopra_visitor
The Visitor Data keys define the custom detail that appears in the Visitor Details area within the live section of the Woopra client.

Any key may be used. With the exception of the user name, e-mail, and avatar, none of the values are stored on Woopra servers.
Examples of interesting visitor data to display in the Live window would include:
|
|
Woopra has three reserved Visitor keys:
- name - which allows Woopra to automatically “tag” and track the visitor.
- email - to capture the visitors e-mail address.
- avatar - whose value should only be an image URL so the Woopra client can download the image and show it in various places.
All keys are optional, but highly recommended as they add a great deal to the social aspects of Woopra, especially when used in conjunction with a CMS, Blog or Forum. Saved data (the three reserved keys) can be analyzed in the Woopra client under Search and Tagged Members in the Analytics section.
Woopra Event Data: woopra_event
The Visitor Event Data represent the current action details. An event is when a visitor reaches a certain page on the site, when a form is submitted, or other actions the visitor takes. Several keys may be added, limited only by the Web browser’s maximum get request length, and displayed in the Live section in the Navigation Path area.

Event data usage examples include:
- Extracting and passing “Contact Form” data to Woopra for real-time display within the client.
- Adding a Comment key to a landing page after a user submitted comment, with an excerpt of a the comment as a value.
- Setting an e-Commerce engine to add keys such as the name of the item(s) purchased, price, total sale, etc.
Values may contain standard HTML Anchor links, which the Woopra Application will render as hyperlinks.
Sample Usage
The Woopra Visitor Data and the Woopra Event Data are optional and not necessary to be present. However, the following example employing both types of data:
<script type="text/javascript">
var woopra_visitor = new Array();
woopra_visitor['name'] = 'John Smith';
woopra_visitor['email'] = 'john@smith.com';
woopra_visitor['avatar'] = 'http://www.example.com/avatars/john1.jpg';
woopra_visitor['posts'] = '13';
var woopra_event = new Array();
woopra_event['comment'] = '<a href="http://www.woopra.com">Woopra</a> is amazing!';
var _wh = ((document.location.protocol=='https:') ? "https://sec1.woopra.com" : "http://static.woopra.com");
document.write(unescape("%3Cscript src='" + _wh + "/js/woopra.js' type='text/javascript'%3E%3C/script%3E"));
</script>
If you have any questions, comments, or suggestions for improvement please share them on the Plugins and Addons Section of the Woopra Forum.
