Using VWO, you can track the number of plays, pause, and rewind of Wistia videos on your website. The end-to-end process for setting up Wistia video tracking involves the following steps:
- Create a custom conversion goal in VWO.
- Add VWO custom conversion code snippet to the Wistia script.
Create a Custom Conversion Goal in VWO
- Create a test and define a custom conversion goal to track.
- Select the URL matches pattern and enter the URL pattern for the pages where the videos are hosted.
- Normally, the custom conversion triggers on a specific page – a thank-you page or something similar. However, in our case, we want the goal to trigger conversion everywhere the Wistia video appears on the website. For this, we use a wildcard (*) to define the URL pattern so that the conversion will occur on every page of the website that contains the VWO SmartCode.
- On the last page of the test creation process, copy the custom conversion code generated for the goal.
- Make note of the goal ID highlighted in the screenshot. You will need it at a later stage.
Add VWO Custom Conversion Code Snippet to the Wistia Script
Add the VWO custom conversion goal code just below the Wistia code on all your test pages. Please note that the custom conversion code is added in addition to VWO SmartCode while it is already present in all your test pages.
Use the following code:
To learn more about, refer to our Video Heatmap blog.