If your viewers are logged in members on your platform or you have returning visitors or leads which you are able to identify, from previous interactions Spotlightr offers several methods by which you can associate their different views in one profile.

Some of these methods do require some code/development knowledge.  If you have questions or need clarification please contact support.

Please note that use of the JavaScript API and vooPlayerContact Cookie requires the presence of spotlightr.js script in your embed code, meaninig that when publishing videos, advanced embed code needs to be turned on.


If you are able to drop a cookie on the domain where Spotlightr videos are embedded that may be the simplest way to identify a contact. Cookie must be set before the viewer hits the play button for that view to be attributed. Here's an example of setting the cookie: 

<script>
var cookie = 'mymember' // this is your viewer id
document.cookie = "vooPlayerContact="+cookie+"; expires=Thu, 18 Dec 2020 12:00:00 UTC; path=/";
</script>

Easiest way to add a cookie on a WordPress site is to include these two lines in your functions.php file. You can edit that file from

$current_user = wp_get_current_user();
setcookie("vooPlayerContact", $current_user->user_email, time()+86400, "/");

?contact= Query String

In use cases where, for example, you have the visitor submitting a form on the first step and then viewing the video on the other page, you can simply forward the id value in the contact query string parameter.

There are many different ways to configure this, but usually if you are using a form provided by your email autoresponder service, you are able to configure the redirect value by including the submitted values. This would look something like this:

https://mysite.com/videopage?contact=%EMAIL%

Using this method, when your contact's email is johnsmith@gmail.com, then they would click a link that would look like this:  https://mysite.com/videopage?contact=johnsmith@gmail.com.  When they get to the /videopage with your Spotlightr video, then the analytics would associate his email with his view behavior.

vooAPI setCustomViewerID Method

Using our JavaScript API you are able to accomplish some pretty cool things with interactions between the Spotlightr video and your page, and one of these is the ability to set the custom contact identifier on the fly in any use case.

This would for example be executed as

<script>
function setCustomViewerID(){
  vooAPI('MjA1NDE=', 'setCustomViewerID', ["member_123"]);
}
</script>

Where you would replace MjA1NDE= with your video id, and member_123 with the unique identifier for your viewer.

For all of the methods value above you can use any string value as the value of the contact id.

Worpdress user short codes plugin

A lot of our users have used User Shortcodes Plus plugin to identify the contact as:

<script> 
document.addEventListener('vooPlayerReady', vooPlayerReady, false);
function vooPlayerReady(event){
vooAPI('MjA1NDE=', 'setCustomViewerID', [user_email]);
}
</script>
Did this answer your question?