So, I have a JWPlayer 6.11 to play a video, when the video is complete, the user gets an overlay DIV "window" with an offer. The overlay DIV has display:none; CSS style when it is inactive.
How do I trigger an event with GA when the DIV becomes visible?
Here's the JavaScript code I'm using to embed a video and show the overlay DIV when video ends:
<script>
jwplayer("video").setup({
width: "640",
height: "480",
image: "http://example.com/cdc9aZuj.jpg",
file: "http://example.com/movies/movie.mp4",
ga: {
idstring: "file"
},
events: {
onComplete: function() {
document.getElementById('overlay').style.display = 'block';
}
}
});