Skip to main content
June 30, 2015
Question

How do you create a Munchkin API call to track video plays?

  • June 30, 2015
  • 4 replies
  • 10064 views

To call the API for a web event such as video play, do you have to create a separate javascript code for each webpage or landing page that has a video on it? Or what type of URL do you need to input in the bolded section below (found this basic code template in the developers marketo website)? Would we put this code inside, below, or above the existing munchkin tracking code in our landing page templates and website? Where can we get a basic template of the javascript code so we can pass to our developers to create the code?

mktoMunchkinFunction('visitWebPage', { url: document.location.path, params: 'playedVideo=true' }); 

Thanks,

Shirleen

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

July 1, 2015

Shirleen Solares​ FYI. I moved your post to the Products and Support​ section of the site -- you will get an answer there faster.

Also, I noticed you have a few accounts on the site. Can you put the word 'Primary' next to your title so we know which one is your primary email address and account. You can see my profile and how I added the word 'Primary' next to my title.

SanfordWhiteman
Level 10
July 1, 2015

Shirleen, I posted this demo a while back: MktoMunchkin :: YouTube Player API - JSFiddle

You should also search the Community for "YouTube".

October 23, 2015

@Sanford Whiteman, this is brilliant - thank you very much for creating and sharing this!  It's simple, easy to follow JavaScript that really gets the job done.

SanfordWhiteman
Level 10
October 23, 2015

Glad it worked for you.  Thanks for the tag!

Josh_Hill13
Level 10
July 1, 2015

You can also get Vidyard to do this for you.

February 18, 2016

@Sanford Whiteman​ We are trying to use the code on one of our pages, but we keep getting an error on page load. I also noticed that you get the same error in your Fiddle for this. Any help is appreciated. Thanks, Thomas

Link to page: Intro to Schoology

SanfordWhiteman
Level 10
February 18, 2016

The Chrome Extension error?  That doesn't relate to the Munchkin code.

Your site is indeed logging the Munchkin video events:

February 19, 2016

Thanks! We had our instance had a backlog of website views and clicks so the data didn't come in until this morning.