All Collections
Vidalytics Code Customizations
Pause a Video When the CTA Button is Clicked
Pause a Video When the CTA Button is Clicked

How to pause the video when the viewer clicks on the CTA button

Patrick Stiles avatar
Written by Patrick Stiles
Updated over a week ago

When a viewer clicks on your CTA button, you can choose to redirect them to another page which opens on a new tab in their browser. And when that happens, you may also want to consider pausing the video while they're on the new tab. To make that happen, you just need to add this script to your page:

You may need a developer if you're not sure how to do this. 

Note that there's this line in the script:

document.getElementById('delay-reveal').addEventListener('click', function () {


This expects HTML element with ID = "delay-reveal" on the page to pause the video. If you don't have it or have an element with a different ID, then you just have to update it with the new element ID. 

Did this answer your question?