• Resolved jpanting

    (@jpanting)


    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/

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

    (@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?

    Thread Starter jpanting

    (@jpanting)

    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

    Plugin Author wptipsntricks

    (@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.

    Thread Starter jpanting

    (@jpanting)

    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

    (@wptipsntricks)

    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"

    Thread Starter jpanting

    (@jpanting)

    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 ‘Tracking code with video link’ is closed to new replies.