pop up and Lightbox youtube video using Google Tag Manager

Standard

Pop up Light box YouTube Video Tracking via Google Tag Manager (Pop up)

Pop up Surface Out and Light box Surface out YouTube video tracking with Google Tag Manager and  Google Analytic

Are you looking how to analyze the reach of different types of interaction with Pop Up out YouTube Video on the web pages.

When you have a site with embedded / Pop up lightbox YouTube Videos tracking you could track how your visitors have interaction with YouTube Video using Google Tag Manager and You can see result in Google Analytic.

This can provide you with an understanding of the way people have interacted along with your Pop up lightbox /iframe/Any Type of YouTube videos using Google Tag Mag Manager. like

  • Play events
  • Pause events
  • Watch to End events
  • 10, 25, 50, 75, & 90% Completion events

Step 1. Create the YouTube is Present Macro with Pop up Light box YouTube Video Tracking using Google Tag Manager 

Macro Name: YouTube is Present for Pop up Light box YouTube Video Tracking using Google Tag Manager
Macro Type: Custom Javascript
Custom Javascript: See below in Screen

Tracking Pop up Light box YouTube Video Tracking Presence using Google Tag Manager

Tracking Pop up Light box YouTube Video Tracking Presence using Google Tag Manager

Step 2. Track Pop up Light box YouTube Video Tracking using Google Tag Manager 

Tag Name: YouTube Listener to Pop up Light box YouTube Video Tracking using Google Tag Manager
Tag Type: Custom HTML Tag

Note:  You need to modify below HTML Code according to YouTube Video using Jquery for Pop up Light box YouTube Video Tracking  using Google Tag Manager similar like below

<script>
$(function() {
$(“.play”).jqueryVideoLightning({
});
});
</script>

2016-06-12_1511

Firing Rules 

Rule Name: YouTube present
Conditions:
{Event name equals gtm.dom
{{YouTube is Present}} equals true

YouTube Video Tracking using Google Tag Manager

Pop up Light box YouTube Video Tracking using Google Tag Manager

Step 3. Create Macros for Event Action, Event Category, and Event Label Pop up Light box YouTube Video Tracking using Google Tag Manager

A: Event Action Macro using Pop up Light box YouTube Video Tracking using Google Tag Manager

Macro Name: dataLayer action
Macro Type: Data Layer Variable
Data Layer Variable Name: eventAction
Data Layer Version: Version 2
Default Value: (blank)

Pop up Light box YouTube Video Tracking

Pop up Light box YouTube Video Tracking using Google Tag Manager

B: Event Category Macro using Pop up Light box YouTube Video Tracking using Google Tag Manager

Macro Name: dataLayer category
Macro Type: Data Layer Variable
Data Layer Variable Name: eventCategory
Data Layer Version: Version 2
Default Value: (blank)

Pop up Light box YouTube Video

Pop up Light box YouTube Video Tracking using Google Tag Manager

C: Event Label Macro using Pop up Light box YouTube Video Tracking using Google Tag Manager

Macro Name: dataLayer label
Macro Type: Data Layer Variable
Data Layer Variable Name: eventLabel
Data Layer Version: Version 2
Default Value: (blank)

Light box YouTube Video Tracking using Google Tag Manager

Pop up Light box YouTube Video Tracking using Google Tag Manager

Step 4. Create UA Youtube Event – UA Tag & Check for YouTube Event Rule Pop up Light box YouTube Video Tracking using Google Tag Manager

Tag Name: UA YouTube Video Tracking – Video Page
Tag Type: Universal Analytics
Tracking ID: (your Google Analytics ID)
Track Type: Event
Event Tracking Parameters:
Category: {{dataLayer category}}
Action: {{dataLayer label}}
Label: {{dataLayer action}}

 YouTube Video Pop Tracking

Tag Setup for Pop up Light box YouTube Video Tracking using Google Tag Manager

Firing Rules

Rule Name: YouTube event

Fire On

Event name equals youtube

Custom Even Tracking for Youbube Video

Warning:if you do n’t know about javascript or do n’t have developing knowledge then do n’t try to implement on Pop up Light box YouTube Video Tracking using Google Tag Manager that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

I am avaible for Hire on Freelancer: Freelancer.com

I am avaible for Hire on Upwork: Upwork.com

I am avaible for Hire on Peopleperhour: Peopleperhour.com

I am avaible for Hire on Guru: Guru.com

5 thoughts on “pop up and Lightbox youtube video using Google Tag Manager

    • margub

      You can jquery like actually it’s depend on how popup come out

      $(“.popup”).click(function () {
      var $this = $(this);
      var $iframe = $(“

  1. Anthony

    Hi Mohammad
    Thanks for taking the time to post these instructions. They have been most helpful. I have managed to get the embedded files working ok but I am trying to fire videos within an Essential Grid but not having any luck. I was supplied the script below by the creators of Essential Grid to embed within the grid’s page but it still hasn’t helped.

    My question relates to the section stated stated above (pasted below) as i was a bit confused how i should modify this and exactly where this should go. Any directions or advice would be greatly appreciated.

    “Note: You need to modify below HTML Code according to YouTube Video using Jquery for Pop up Light box YouTube Video Tracking using Google Tag Manager similar like below

    $(function() {
    $(“.play”).jqueryVideoLightning({
    });
    });

    Essential grid API script

    /* listen for clicks for outbound links, lightbox, and filter buttons */
    jQuery(‘body’).on(‘click’, ‘.esg-grid a, .esg-filterbutton’, function() {

    var $this = jQuery(this),
    data = ”;

    /* if click is outbound link or lightbox */
    if($this.is(‘a’)) {

    /* if clicked item is lightbox link */
    if($this.hasClass(‘esgbox’)) data += ‘Lightbox: ‘;

    data += $this.attr(‘href’);

    }
    /* if click is filter button */
    else {

    data += ‘Filter: ‘ + $this.text();

    }

    /* send event data to Google */
    __gaTracker(‘send’, ‘event’, ‘outbound’, ‘click’, data, {‘transport’: ‘beacon’});

    });

    Many thanks, Anthony

Leave a Reply

Your email address will not be published. Required fields are marked *