ViewedIt is now Vidyard GoVideo! Click here to learn more.

How do I add a Google Analytics Event tracker in a Vidyard Marketo Form?


Google Analytics (GA) can be used to not only track the number of people who visit your web page, but also the actions they take. You may have a requirement to gather metrics on form data submission from Marketo Forms that appear within a Vidyard player.


1. You will first need to copy the GA tracking code related to your instance and paste it into the top of your Marketo form. Directly underneath this code will be another script that adds the functionality to send data into GA. That looks like:

<script type='text/javascript'>

function linkClicked () {
var playerTitle = window.parent.document.title;

ga('send', 'event', 'Vidyard', playerTitle, 'Form Submitted');


In the Event, it should end up appearing like this:

A code snippet calling out where to find the GA codes

2. The next step is to add a reference to the function within the onSubmit section. This should already be part of your code. The line of text you need to add is:


Add the line formSubmitted(); above API.closeCta();

Now when your viewers successfully submit the form, an Event will appear in GA that shows:

Category = 'Vidyard'

Action = {Player title}

Label = 'Form Submitted'

Was this article helpful?

Can’t find what you’re looking for? Please contact us below.

Email Vidyard Support
Why you didn't like the article?

If you would like Vidyard to get in contact with you regarding your feedback, please enter your email address.

  • No, Thanks