Video tags can be triggered at any specific time during video playback. This is a very powerful feature which 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.

There are two methods you can use: 

1. Via URL Parameter

Every video tag passes the “user_id” and “email” fields by default, but you will still need to add "email" and/or "user_id" into the Field name part of the tag to be able to properly tag them. Values for all fields are taken from the URL parameters. 

So for example, if your site URL is http://example.com and you want to pass the “email” field value, then your link has to be http://[email protected]

It is also possible to pass custom field values when the video tag is fired. To do this, you must register a field (or fields) for the video tag in your video settings.

For example, you can add your custom field named “customField123”. Then, to pass on its value when the video tag is fired, you need your URL to be similar to this one: http://example.com?customField123=something

If you want to pass both the email and your custom tag, your URL would be something like -- http://[email protected]&customField123=something

For ClickFunnel users: You can use this method by using a very useful tool - CF Pro Tools. You will be able to get the code for CF URL Email Replacer which will pass the email address from the opt-in to the URL on the next page.

More info on CF Pro Tools HERE

How to set up and use the URL Email Replacer from CF Pro Tools HERE

2. Via Embed Code (Advanced)

Another option is to pass field values through the embed code without using URL parameters. It is an advanced setup and requires JavaScript coding skills + the ability to get values from whatever third party platform you're using.

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).

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

How to Set Up the Zapier Integration

Did this answer your question?