Important Rules:
- Maintain the original formatting (markdown, HTML tags, links, etc.)
- Keep technical terms and proper nouns as appropriate
- Preserve code blocks and technical syntax exactly
- Maintain the same tone and style
- Only output the translated text, no explanations or comments
Marketing automation and tracking article, I discussed an example marketing automation (marketing automation) process. In this article, I’ll describe how, using a similar approach to the one I shared, we can pass data from a video’s viewing duration via Vidalytics to ActiveCampaign through Zapier, and also address a few technical issues that may arise.
Vidalytics Video Tags
With Vidalytics, video-specific actions such as adding calls-to-action (CTAs) and managing conversion tags can be defined, along with triggers that activate based on specific video durations.
This way, when a user sees a call-to-action or a CTA within the video, relevant user data can be passed to Zapier. Let’s proceed from the illustration above. The tag setup shown in the image triggers an action when the video is viewed for 3 minutes and 20 seconds. This trigger, expressed as a tag, has the name TAG_Name and a unique ID aBCd1Ef2gHiJKLMN. Particularly, this ID is very important for us and varies depending on the specific video.
The Embed ID and Tag ID are two different values. When the relevant tag is triggered, it also carries along the associated parameter. As seen in the image, the parameter email is defined. Now, let’s illustrate the process with a flow.
[mermaid] graph LR 1[Sources] 2((Vidalytics)) 3[Blog] 4[Product Page] 5[Zapier] 6[ActiveCampaign] 7(CRM) 8(LP) 9(BP) 10(OF)
1 —> 4 & 3 7 -.-> 3 & 4 9 & 4 & 3 ==> 2 2 ==> 5 1 —> 5 —> 6 1 —> 8 —> 9 —> 10 —> 5
subgraph Website 3 & 4 end
subgraph ClickFunnel 8 & 9 & 10 end
class 3,4 sub2; classDef sub2 fill:#8be88b,stroke:#333;
class Website sub3; classDef sub3 fill:#e3ffc9,stroke:#333;
class 8,9,10 sub; classDef sub fill:#c1c1c1,stroke:#333;
class ClickFunnel sub4; classDef sub4 fill:#e8e8e8,stroke:#333; [/mermaid]
Let’s assume that in the above flow, all touchpoints within the Website and ClickFunnel sections are associated with the same video.
<div id="vidalytics_embed_xYz01wQAB_C9dE8f" 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);});});
})(window, document, 'Vidalytics', 'vidalytics_embed_xYz01wQAB_C9dE8f', 'https://quick.vidalytics.com/embeds/a0BCdDef/xYz01wQAB_C9dE8f/');
</script>
The a0BCdDef value in the embed code is a property ID and remains the same across all videos. However, the xYz01wQAB_C9dE8f value is the video ID and varies across each video.
Transmission of Email Parameters in Vidalytics
On the ClickFunnel side, the user is initially directed to the LP page. At this stage, a lead form is present, associated with the offer we’ve sent. The user then proceeds to the BP page, where they can be directed to a video to present an upsell offer. Under the ClickFunnel framework, we may reasonably assume that we now have the visitor’s email address.
It would be appropriate to add a feature related to ClickFunnel. If there are issues with email collection, you can utilize the CF URL Email Replacer code snippet provided by CF Pro Tools1. This code snippet enables us to use the email address stored in CF’s localStorage as a URL parameter. If, despite using the relevant code, the email field comes up empty, you can update the email variable as follows:
var email = localStorage.getItem("garlic:"+document.location.host+"*>form>input.email") || getURLParameter("email");
On the Website side, we can also access user data via CRM or through the form itself.
We can now pass the email address directly into the Vidalytics embed code, either directly or via a parameter in the URL. To achieve this, we must update the relevant code as follows2.
<div id="vidalytics_embed_xYz01wQAB_C9dE8f" style="width: 100%; position:relative; padding-top: 56.25%;"></div>
<script type="text/javascript">
// ADDED SECTION
var vidalyticsCustomSettings = {
plugins: {
trigger: {
triggers: {
"aBCd1Ef2gHiJKLMN": {
params: {
email: localStorage.getItem("garlic:" + document.location.host + "*>form>input.email") || getURLParameter("email")
}
}
}
}
}
};
(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_xYz01wQAB_C9dE8f', 'https://quick.vidalytics.com/embeds/a0BCdDef/xYz01wQAB_C9dE8f/');
Let’s break down the changes.
First, within the vidalyticsCustomSettings variable, we’ve assigned various parameters. These parameters are used to configure and set up the trigger plugin. As previously mentioned, the ID value aBCd1Ef2gHiJKLMN serves as a unique, video-specific tag identifier. After properly constructing the variable’s content, we must call this variable from within the embed code. This is accomplished through the t.run() call on line 1512.
// Then
t.run(a, vidalyticsCustomSettings)
Once the video reaches the specified duration defined within the tag with ID `aBCd1Ef2gHiJKLMN`, the trigger will be activated, and the `email` value will be passed to the next step. To view the `email` value that the variable has acquired, you can call it in your browser's _console_ section as follows[^2] [^3].
```js
vidalyticsCustomSettings.plugins.trigger.triggers['aBCd1Ef2gHiJKLMN'].params.email;
Of course, we might not be passing just the email. You can include additional information such as the user ID, location, device details, and many other data points into this tag flow. However, there is one important point to keep in mind: if a trigger tag has been set up for a Vidalytics video, Vidalytics will automatically trigger the email and user-id parameters when the specified time is reached. If no value has been assigned to these parameters, they will be passed as null. If you have linked these parameters to another service within Zapier, you may encounter errors due to null values. This situation applies when videos are used across different services.
Zapier: Vidalytics + ActiveCampaign
In the final step, we need to retrieve the email parameter through the relevant Zapier integration. Since Vidalytics now allows us to access the values (passed via the Vidalytics tag) to the next step — whether from a website, ClickFunnel, or another flow — we can now pass this information to the next integration3.
Of course, it is also necessary to specify the purpose for which this information (action event) will be used. Since the example mentioned in the text primarily targets new users, Create/Update Contact would be a more appropriate choice.
After completing this step, the sales process will be able to utilize both notifications and proposals, linked to user data obtained from various sources.