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.

Requirements:

  • Zapier account
  • Vidalytics Zapier Integration (you can enable it from the “Integrations” tab in the dashboard)

There are two methods you can use: 

1. Via URL Parameter

Every video tag passes the “user_id” and “email” fields by default. Values for all fields are taken from the URL parameters. 

So for example, if your site URL is http://yoursite.com and you want to pass the “user_id” field value, then your link has to be http://yoursite.com?user_id=xyz

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 its value when the video tag is fired, you need your URL to be similar to this one: http://yoursite.com?customField123=customValue

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 some basic JavaScript coding skills.

  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
                   }
               }
           }
       }
   }
};


5. Then, replace a small part of 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 image to enlarge


8. Now you can 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.

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

How Zaps Work (CRM Tagging)

Did this answer your question?