WordPress.org

Forums

WP Video Lightbox
[resolved] Tracking code with video link (7 posts)

  1. jpanting
    Member
    Posted 11 months ago #

    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’]);"

    https://wordpress.org/plugins/wp-video-lightbox/

  2. wptipsntricks
    Member
    Plugin Author

    Posted 11 months ago #

    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?

  3. jpanting
    Member
    Posted 10 months ago #

    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.

    http://www.brevium.com/test-elements

  4. wptipsntricks
    Member
    Plugin Author

    Posted 10 months ago #

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

  5. jpanting
    Member
    Posted 10 months ago #

    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.

  6. wptipsntricks
    Member
    Plugin Author

    Posted 10 months ago #

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

    href="http://www.youtube.com/embed/gHxRnvyOiRE?rel=0&autoplay=1&iframe=true&width=1000&height=560%20onClick=_gaq.push(%5B"

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

    href="http://www.youtube.com/watch?v=gHxRnvyOiRE?rel=0&width=1000&height=560"

  7. jpanting
    Member
    Posted 10 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.