[EN] Collecting Snoobi Session Properties

Modified on Thu, 07 Mar 2024 at 08:46 AM

Snoobi's session properties, how to collect the data.


The data is collected with the following script.
In addition to this, the standard Snoobi collection script needs to be present.

<script type="text/javascript">
var _saq = _saq || [];
_saq.push(['addProperty', 'parameter 1', 'parameter 2', 'parameter 3']);
</script>

Parameter 1
The 1st parameter becomes the name of the property, as it will be shown in the reports.

Parameter 2
The 2nd parameter is the value of the property

Parameter 3
 The 3d parameter can have the following modes:

  • ignore = leave the older value (the visitor's session always has one value, already set)
  • overwrite = leave the newer value (the visitor's session always has one value, but replace)
  • append = add a new value for the user (the visitor's session has multiple values)

There can be one or more properties per collection call, simply add more 'addProperty' lines.

Be careful to use exact naming conventions, including upper- and lowercase.

An example, collecting logged in user data. 

<script type="text/javascript">
var _saq = _saq || [];
_saq.push(['addProperty', 'UserId', '123', 'overwrite']);
_saq.push(['addProperty', 'Locale', 'fi', 'overwrite']);
_saq.push(['addProperty', 'Department', 'Sales', 'overwrite']);
</script>

In this case we add the UserId, Locale and Department to the session.

Session Properties will be visible in the analytics reports, can be used in filters, segments or rating groups and are available as a Snoobi Datafeed.

More information in this White Paper on Session Properties


Note: Extensive use of multiple properties can influence the speed of reporting and increases the number of stored events.

 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article