How to Integrate SALESmanago with Youtube Player? [Free Template]

abstract vector illustration in a vintage style

We love moving pictures – whether we watch them on TV, laptop, tablet or smartphone. Making instructional, advertising, and product showcasing videos became common thing for both global, big brands, but also smaller local ones. It’s much easier for us, recipients of content, to engage in something colorful and moving, than with static picture or wall of text. Dr. James McQuivey from Forrester says, that one minute of video may equal up to 1.8 million words. It happens because our mirror neurons are not differentiating a video from reality, and when they see paint commercial in which a happy couple is painting walls of their new home, by empathy we also become happy. Another advantage of this medium is much faster processing of content provided in video clip than written down, as much as 60 000 times faster.

 

Everyone is watching videos. 75% of executives are watching at least one brand video per week, and of those who did enter the webiste of given company, 39% initiated the contact after seeing the video.

Users generally trust videos they see, and marketers know it. Video commercials are responsible for more than 35% of all online spendings! Popularity of videos in mobile channel is also rising – expenses were doubled in years 2013-2014 ($720 millions to $1.5 billion USD) and it’s estimated that in 2018 they will reach as much as $6 billions USD.

 

You already have the scenario of a hit video in your mind? Great! According to Unbounce putting video on a landing page increases the conversion up to 80%. For most of users (90%), it is incredibly important in decisive process. Is it possible to want more?

 

I have great news for everyone wanting to efficiently use their worktime! Thanks to the pinch of marketing automation magic and appropriate placing of the video on your website, you can use the interaction to fill in user’s behavioral profile, start the automation rule, and create dynamic content.

 

SALESmanago platform is able to intercept events related to Youtube player such us:

  • loading of the player
  • starting the video
  • pausing the video
  • stopping the video altogether

 

Here’s an instruction on how to integrate our platfrom with Youtube player!

On website you want to embed your video there must be SALESmanago monitoring code.

You also need to embed Youtube video using following parametres:

 

<iframe id=”player” width=”560″ height=”315″ src=”https://www.youtube.com/embed/0z5qByhbJKw?enablejsapi=1” frameborder=”0″ allowfullscreen></iframe>

 

Remember of the parameter enablejsapi=1!

 

Next you initiate appropriate objects in tag <script>:

 

var tag = document.createElement(‘script’);

tag.src = “https://www.youtube.com/player_api“;

var firstScriptTag = document.getElementsByTagName(‘script’)[0];

firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

var player;

     function onYouTubeIframeAPIReady() {

       player = new YT.Player(‘player’, {

       

         events: {

           ‘onReady’: onPlayerReady,

           ‘onStateChange’: onPlayerStateChange

         }

       });

     }’

 

Function description:

  1. Function responsible for loading the player:

function onPlayerReady(event) {

smEvent(“video_player_ready”);

     }

 

  1. Function responsible for sending events – player status changes:

    var firstPlay = false;

     function onPlayerStateChange(event) {

       if (event.data == YT.PlayerState.PLAYING) {

if (!firstPlay)

smEvent(“video_started”);     

firstPlay = true;

       }

if (event.data = YT.PlayerState.PAUSED) {

smEvent(“video_paused”);

}

if (event.data = YT.PlayerState.ENDED) {

smEvent(“video_ended”);

}

     }

 

How does it look in the real life? Here’s how such an integration should look like:

<html>

<head>

<body>

<iframe id=”player” width=”560″ height=”315″ src=”https://www.youtube.com/embed/0z5qByhbJKw?enablejsapi=1″ frameborder=”0″ allowfullscreen></iframe>

<script>

var tag = document.createElement(‘script’);

tag.src = “https://www.youtube.com/player_api”;

var firstScriptTag = document.getElementsByTagName(‘script’)[0];

firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

var player;

     function onYouTubeIframeAPIReady() {

       player = new YT.Player(‘player’, {

       

         events: {

           ‘onReady’: onPlayerReady,

           ‘onStateChange’: onPlayerStateChange

         }

       });

     }

 

 function onPlayerReady(event) {

smEvent(“video_player_ready”);

     }

 

 var firstPlay = false;

     function onPlayerStateChange(event) {

       if (event.data == YT.PlayerState.PLAYING) {

if (!firstPlay)

smEvent(“video_started”);     

firstPlay = true;

       }

if (event.data = YT.PlayerState.PAUSED) {

smEvent(“video_paused”);

}

if (event.data = YT.PlayerState.ENDED) {

smEvent(“video_ended”);

}

     }

 

     

 

</script>

 

<script type=”text/javascript”>

//please insert SALESmanago tracking code

   var _smid = “*********”;  

   (function() {

     var sm = document.createElement(‘script’); sm.type = ‘text/javascript’; sm.async = true;

     sm.src = (‘https:’ == document.location.protocol ? ‘https://’ : ‘http://’) + ‘www.salesmanago.pl/static/sm.js’;

     var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(sm, s);

   })();

 

</script>

</body>

</head>

</html>

 

What’s next?

User-video interaction is the same event for the platform as website visits are. Thanks to this, you are able to use this data to create education cycles about the particular group of products, send dynamic emails recommending further instructions, or… similar or complementary products. If you dream of developed campaign, which includes multiple factors, conditions and scenarios, you must use of our Workflow creator (You’ll find it here). Additionally you can use this information to segment the databases. Use tags system (you can add tags by creating the Workflow process, or by setting up an automation rule).

 

It is worth to find a place for commercial video in your marketing budget. 64% of users are more willing to making a purchase after seeing a video, and as much as 46% of them is making an action after seeing such commercial! We hope that thanks to our guide you’ll start conquering new territory with newly found enthusiasm.

 

What are the other guides you’d like to see on our blog?

Statistics source: Insivia

 

SALESmanago is a Customer Engagement Platform for impact-hungry eCommerce marketing teams who want to be lean yet powerful, trusted revenue growth partners for CEOs. Our AI-driven solutions have already been adopted by 2000+ mid-size businesses in 50 countries, as well as many well-known global brands such as Starbucks, Vodafone, Lacoste, KFC, New Balance and Victoria’s Secret.

SALESmanago delivers on its promise of maximizing revenue growth and improving eCommerce KPIs by leveraging three principles: (1) Customer Intimacy to create authentic customer relationships based on Zero and First Party Data; (2) Precision Execution to provide superior Omnichannel customer experience thanks to Hyperpersonalization; and (3) Growth Intelligence merging human and AI-based guidance enabling pragmatic and faster decision making for maximum impact.

More information: www.salesmanago.com

SALESmanago and Leadoo join forces to build Europe’s largest Customer Engagement Platform and drive mid-market eCommerce growth
SALESmanago and Leadoo join forces to build Europe’s largest Customer Engagement Platform and drive mid-market eCommerce growth

    SALESmanago acquires SaaS marketing technology conversion platform Leadoo as part of mission to become Europe’s number one CEP Helsinki-headquartered Leadoo will strengthen SALESmanago’s presence in the UK, Nordics and Benelux, powering eCommerce customer growth with deep insights and personalisation   Krakow/Poland & Helsinki/Finland, November 26th, 2024: SALESmanago, the European SaaS powerhouse with over […]

CMO Role Getting Too Tight? Try Being A Growth Hacker Instead
CMO Role Getting Too Tight? Try Being A Growth Hacker Instead

    by Katrin Lewandowski, Senior Marketing Director at SALESmanago   The year is 2024, and the traditional Chief Marketing Officer (CMO) role is experiencing a transformation. Prominent companies, including brands like UPS and Etsy, have moved to eliminate or repurpose the CMO position—redistributing its responsibilities to roles such as Chief Commercial or Strategy Officers. […]

Skeletons in the eCommerce closet. Which one is your worst nightmare?
Skeletons in the eCommerce closet. Which one is your worst nightmare?

    As Halloween draws near, the urgency to unveil and exorcise the lurking skeletons from eCommerce closets becomes increasingly palpable. Just as the haunted season prompts us to confront our fears, the digital landscape compels businesses to confront the formidable challenges that often remain concealed.   In 2024, the stakes for eCommerce companies have […]

eCommerce Booms and Stagnates
eCommerce Booms and Stagnates

    By Brian Plackis Cheng, CEO at SALESmanago   Commerce is fickle; it stagnates and booms. Customer journeys are non-linear. And these are the things we know for sure. Without actionable customer data and personalised journeys, eCommerce companies are losing customers and prospects, eroding their brand, and sacrificing their competitive edge.    Embracing zero-party […]

Plateau of Productivity – Business vs AI face off 2024
Plateau of Productivity – Business vs AI face off 2024

    YouTuber Tomasz Rożek’s channel, “Science. I like It,” recently featured a fascinating discussion on “Next Steps of AI Expansion” with Aleksandra Katarzyna Przegalińska-Skierkowska. While the lack of English subtitles remains a mystery, the conversation itself is a must-watch.   Plateau of productivity   Tomasz Rożek graduated in physics and journalism from the University […]

Are Your Marketing Strategies Future-Proof? A Mid-Year Check-In for CMOs
Are Your Marketing Strategies Future-Proof? A Mid-Year Check-In for CMOs

    As we have crossed the midpoint of 2024, it’s an opportune moment for Chief Marketing Officers (CMOs) to evaluate progress and ensure their strategies align with… the “dynamic landscape” would be an understatement, really. With Gartner identifying AI integration, evolving marketing roles, and cross-functional growth as top priorities for 2024, CMOs need to […]