Trigger Feedback after a Video

Trigger a Campaign to show after a video ends. You can use a Manual Trigger to trigger a campaign by initiating a GetFeedback Digital JavaScript API Command. This can be. helpful when you want to ask users for feedback regarding the video that they just watched.

The implementation explained in this article does not work with Youtube. If you want to trigger a Campaign after a Youtube video has ended you'll need to use the Youtube iFrame Player API.

To trigger a survey after a video ends:

  • Use an HTML5 video player.
  • Place your video on the same page that you’ve implemented GetFeedback.

Create a Popup Campaign with a Manual Trigger

First, create a campaign that uses a Manual Trigger. Set the manual trigger command “vjsEnded.” By doing so your Campaign will only trigger when the following JavaScript API command is initiated:

Learn more about creating campaigns

Next, JavaScript to your web page that interacts with your HTML5 video. The example script below shows an example that implements both the HTML5 video; and the setup for the manual trigger. View source code here.

Example code hosted in Github for implementing the HTML5 video, as well as the setup for the manual trigger.

The script uses the HTML5 Video API to check for the event that is executed when the video has ended. More information about this can be found in the MDN web docs.

Using that event, the script sends out a manual trigger to GetFeedback Digital, which triggers the campaign.