🚨Disclaimer: This is an advanced setup and requires JavaScript coding skills and the ability to pass a unique identifier (e.g. email, contact ID, etc.) to our player from your opt-in form to our player. If our player cannot read the parameters sent, it won't be able to tag your viewers. We would recommend getting a developer to do this method.🚨

⚠️ If you are trying to achieve this in ClickFunnels, go here instead.

Video tags can be triggered at any specific time during video playback. This is a very powerful feature that can be used in many ways.

Examples:

  • You can send an email to the user if he watched the video until the end (keep in mind a good practice - set the video tag time about 10 seconds before the end instead of the last second)

  • You can add the user to a specific e-mail campaign after he reaches some point in the video.

This is for all cases where passing param via URL is not possible or just not acceptable (like when using a landing page builder).

  1. Go to your video settings, create your Video Tag and grab its ID.

Your setup should look like this ^

2. Confirm your changes by clicking the “Publish” button on the top-right corner.

3. Now it’s time to customize your embed code. You can grab the default one by clicking on the “Embed / Share” button.

4. To override the default Vidalytics Player settings and pass your video tag field values, you need to create a custom JavaScript object and then pass it to the embed code. It must have the following structure:

var vidalyticsCustomSettings = {
plugins: {
trigger: {
triggers: {
"gQ0EotDtTQXP3CQy": { // key must match Video Tag ID
params: {
customField: 'Custom Field Value', // key must match Video Tag Field Name
user_id: 'Custom User ID' // "user_id" (and "email") are registered by default so you don’t have to register them in the dashboard to make them work
}
}
}
}
}
};

To pass an email, you'd just have to add an "email" field under "user_id" (or replace "user_id" with "email").

The Trigger UID + set param names should match the ones set in the Vidalytics dashboard, and you should set their values in the custom piece of JS above.

5. Then, replace a small part of the embed code:

"t.run(a)" has to be replaced with: "t.run(a, vidalyticsCustomSettings)".


6. Your final customized embed code with the video tag field values should be similar to this:

Click the image to enlarge


8. You can now install this code on your site. Watch the video on your site until your tag is fired to push some test data to Zapier.

It is important to do at least one test before going to Zapier. Without it, Zapier would not discover your video tag field setup.

Here is a sample of what your final code will look like. Feel free to use it, but make sure you change the tag ID and general embed script with your own so it works properly!

<script type="text/javascript">
var vidalyticsCustomSettings = {
plugins: {
trigger: {
triggers: {
"X8WimvbuOmXfdvEm": {
params: {
user_id: 'Custom User ID',
email: 'Email'
}
}
}
}
}
};
</script>
<div id="vidalytics_embed_ga6xMxNv6i8_0uQ7" style="width: 100%; position:relative; padding-top: 56.25%;"></div>
<script type="text/javascript">
(function (v, i, d, a, l, y, t, c, s) {
y='_'+d.toLowerCase();c=d+'L';if(!v[d]){v[d]={};}if(!v[c]){v[c]={};}if(!v[y]){v[y]={};}var vl='Loader',vli=v[y][vl],vsl=v[c][vl + 'Script'],vlf=v[c][vl + 'Loaded'],ve='Embed';
if (!vsl){vsl=function(u,cb){
if(t){cb();return;}s=i.createElement("script");s.type="text/javascript";s.async=1;s.src=u;
if(s.readyState){s.onreadystatechange=function(){if(s.readyState==="loaded"||s.readyState=="complete"){s.onreadystatechange=null;vlf=1;cb();}};}else{s.onload=function(){vlf=1;cb();};}
i.getElementsByTagName("head")[0].appendChild(s);
};}
vsl(l+'loader.min.js',function(){if(!vli){var vlc=v[c][vl];vli=new vlc();}vli.loadScript(l+'player.min.js',function(){var vec=v[d][ve];t=new vec();t.run(a, vidalyticsCustomSettings);});});
})(window, document, 'Vidalytics', 'vidalytics_embed_ga6xMxNv6i8_0uQ7', 'https://fast.vidalytics.com/embeds/kpRgkfwv/ga6xMxNv6i8_0uQ7/');
</script>

Note that to test your Zaps, you can use emails with '+' signs, but they should be written as %2B if you are simply appending the email address on your URL for testing purposes.

To add multiple tags, you will need to add a comma before every new ID as shown below:

Note:

The field tag is something you need to get from your CRM. It must match identically to what your CRM calls it (e.g. if they call it "contact_id" you must put that into our system exactly). You may be able to choose from more than one field over there, but it must be unique. The typical ones are email address (only one person can have the same email address) and contract id (or some variation of what your CRM calls contact id).

For a simpler method via URL Parameter, check out this article :

How to Tag Your Video Viewers in Your CRM or Email Platform Via URL Parameter


To set up your Zap in Zapier, check out this article:

How to Set Up the Zapier Integration

Did this answer your question?