**IMPORTANT** Please note that this feature requires the Advanced Embed Code. If you want to track any of your viewers/contact, you must use the Advanced Embed Code.

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 videos views in one profile inside of Spotlightr.

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. This means that when publishing videos, advanced embed code needs to be turned on. For instructions on that and other info on your embed code, please check this article.

Method 1: ?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:


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.

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: 

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

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, "/");

Method 3: 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

function setCustomViewerID(){
  vooAPI('MjA1NDE=', 'setCustomViewerID', ["member_123"]);

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:

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