YouTube has become an incredibly popular way to communicate information. From promotional videos and speaking engagements to tutorials and D-I-Yers, YouTube has revolutionized mass communication. But did you know that you can use Web Tracking to determine if someone has played an embedded YouTube video on your Higher Logic site?
NOTE: To complete this task, you’ll need the ability to make changes to your Higher Logic site.
To track plays of embedded YouTube videos:
Many YouTube videos are embedded using iFrames. To track YouTube views, you can use YouTube’s iFrame API.
- Add the normal Marketing Automation Professional Web Tracking Code to the bottom of the page on your site containing the embedded YouTube video.
- At the top of that web page, include the following script: Click to view the YouTube API script.
- Add the following code where you would normally add iFrame code: Click to view the iFrame code.
- Lastly, you need to include code to receive the Play action from YouTube. This way, whenever someone plays a video on your site (by clicking the Play button), you’ll see a Web Tracking result. Add the following code and make sure you enter the correct video ID: Click to view the YouTube play script.
That’s all there is to it! Now you’ll see interaction data related to video plays in your Web Tracking Report.