Transparent mask/layer over video w/ affiliate link embedded

5 replies
Sorry, I don't know if this belongs under web design or programming so I just posted here.

I have seen affiliate landing pages where there is an autoplaying youtube video embedded into the page and there is some sort of transparent mask/layer over the video that contains an affiliate link.

Therefore, of the visitor tries to click the video to pause it or something, they actually end up clicking on this transparent mask/layer with the affiliate link embeded and therefore they end up getting redirected to he sales page with the affiliate link.

Does anyone know how to do this? I have tried searching now for about an how and cannot find how to do this.
#affiliate #embedded #layer #link #mask or layer #maskor #transparent #video #w or
  • Profile picture of the author Joe Ray
    You don't need any transparent layer, just put the video tag inside an <a></a> tag then anywhere you click on the video player you will be redirected to the other site.
    {{ DiscussionBoard.errors[10547235].message }}
  • Profile picture of the author MSutton
    tanks but that didn't work for me. When I hovered over the video it showed my link, but when I clicked it did nothing.

    I ended up doing this...

    html - Linkable <Div> Overlay on iframe Video | Rails - Stack Overflow
    {{ DiscussionBoard.errors[10548302].message }}
  • Profile picture of the author Joe Ray
    It didn't work for you because you have to modify the code in the iframe if you want to use the <a> tag. A simple <a> tag only works if you're hosting your own video and using a video tag. With a little bit of modification it works flawlessly for the youtube iframe as well.

    What you did with the transparent <div> is a sub-optimal solution. The <a> tag is a much better choice.
    {{ DiscussionBoard.errors[10548470].message }}
  • Profile picture of the author MSutton
    OK, so what is that modification assuming the video is an iframe? You see, I'm not a programmer. People who don't know how to code do not understand "just do it the right way and it will work". If we knew the "right way" or how to "modify", we wouldn't ask questions such as the one I asked
    {{ DiscussionBoard.errors[10561135].message }}
  • Profile picture of the author MSutton
    Sorry it takes me so long to respond, BTW. I am subbed to this thread but for some reason I don't get emails or any other notifications when someone posts to it. I don't have this problem on other threads.
    {{ DiscussionBoard.errors[10561137].message }}

Trending Topics