Support » Plugins and Hacks » WP Video Lightbox » [Resolved] Tracking code with video link

[Resolved] Tracking code with video link

  • Is there a trick to adding tracking code to a lightbox link? I have a layer slider and each slider has a video link that brings up the video in a lightbox using this code. http://www.youtube.com/embed/gHxRnvyOiRE?rel=0&autoplay=1&iframe=true&width=1000&height=560

    When I add the tracking code, the lightbox that opens is the full height of the webpage. http://www.youtube.com/embed/gHxRnvyOiRE?rel=0&autoplay=1&iframe=true&width=1000&height=560 onClick=”_gaq.push(['_trackEvent', 'slider', 'click', ‘video’, ‘1’]);"


Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author wptipsntricks


    Hi, the tracking code shouldn’t affect lightbox because its a different attribute. Can you please provide a link to the page in question so I can take a look?

    Sorry for the late reply. The link for the page in question is below. The code is on the video image on the first slide.


    Plugin Author wptipsntricks


    Thanks. I just checked the video and it didn’t take the full width of the page. I believe everything is working fine now.

    The width is fine, but the lightbox opens with a crazy height and the actual video centered way down the page. It’s happening with Firefox and Chrome. Here is a screenshot.

    Plugin Author wptipsntricks


    Hi, your YouTube video link is not correct. This is how the href attribute looks like:


    Please change it to the following and see how it goes:


    Your suggested code works, but the ?rel=0 parameter is being ignored. We do not want the suggested videos to show up at the end. I have updated the site to show the 3 different links we have tried.

    The ‘Find Out How It Works’ button has the original code, which opens the lightbox and plays the video with no suggested videos at the end.

    The video image is the same link, but with the tracking code added. It plays the video with no suggested videos at the end, but the lightbox height is crazy big.

    The ‘Learn More’ button has your suggested code, which opens the lightbox to the correct size and plays the video, but shows suggested videos at the end.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Tracking code with video link’ is closed to new replies.