SOLVED

Trying to Track Clicks on a Marketo Landing Page

Go to solution
Anonymous
Not applicable
Hi,

I am trying to track clicks on a Marketo landing page. One link is below an embedded slide deck however I am not sure if Munchkin code has been placed on the third party page where that slide deck is hosted.

Also want to track any clicks on an embedded Google Slide and Vimeo video. What steps do I need to take to ensure we can track clicks on the Marketo landing page?
Tags (1)
1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator
Here's sample code that tracks YouTube events (Play, Pause, Play Until End) using Munchkin.  Adapted from YT's guide here.
 
<!-- 1. this DIV is replaced by the player IFRAME -->
<div id="player"></div>
<script>
  // 2. This code loads the IFrame Player API code asynchronously.
  var tag = document.createElement('script');

  tag.src = "https://www.youtube.com/iframe_api";
  document.getElementsByTagName('head')[0].appendChild(tag);

  // 3. This function creates an <iframe> (and YouTube player)
  //    after the API code downloads.
  var player, videoId = 'M7lc1UVf-VE';
  function onYouTubeIframeAPIReady() {
    player = new YT.Player('player', {
      height: '390',
      width: '640',
      videoId: videoId,
      events: {
        'onStateChange': onPlayerStateChange
      }
    });
  }

  // 4. The API calls this function when the player's state changes.
  function onPlayerStateChange(event) {
    switch( event.data ) {
    case YT.PlayerState.PLAYING:
        Munchkin.munchkinFunction('visitWebPage', {
            url: 'https://youtube.com/'+videoId
           ,params: 'movie-action=pressed-play'
           }
        );
        break;
    case YT.PlayerState.PAUSED:
        Munchkin.munchkinFunction('visitWebPage', {
            url: 'https://youtube.com/'+videoId
           ,params: 'movie-action=paused'
           }
        );
        break;
    case YT.PlayerState.ENDED:
        Munchkin.munchkinFunction('visitWebPage', {
            url: 'https://youtube.com/'+videoId
           ,params: 'movie-action=played-til-end'
           }
        );
        break;
     }

  }
</script>

Of course you probably don't care about multiple Play events and likely don't care about Pause. Play Until End is significant -- but the catch is that the lead could pause 1 sec. before the end and you'd just see a Pause.

View solution in original post

25 REPLIES 25
Dan_Stevens_
Level 10 - Champion Alumni

The values for Marketo LPs are different than the URLs you see for your tracked website pages.  For Marketo LPs, the value takes on the asset name, not the URL (e.g., "Program-Name.LP-Name").  Try entering the name of the program where the landing page resides and you should see the name appear here.  Of course, the LP must first be in "approved" mode.

Anonymous
Not applicable

Hello,

I am trying to locate the LINK on a Marketo Landing Page. So looking

up Program-Name.LP-Name

is not going to give me what i need. I want the LINK to be in the drop down

menu low.[image: Inline image 1]

On Mon, May 2, 2016 at 11:01 AM, Dan Stevens <marketingnation@marketo.com>

Dan_Stevens_
Level 10 - Champion Alumni

You're right, but oftentimes, you'll want to constrain it to the LP so that it's only tracking link activity on that page.  Before any value will show up in the drop-down list, Marketo first needs to index it.  So be sure to click on - assuming you're already a cookied user - and wait for about 15-30 minutes.  Then it should appear.  Do not include the http/https.

Anonymous
Not applicable

That worked!!! thanks

On Mon, May 2, 2016 at 11:34 AM, Dan Stevens <marketingnation@marketo.com>

Anonymous
Not applicable

Hi Josh,

could you please give me a hand? We would love to use filter "visited we page" or "click in" our Marketo landing page. The problem we encounter is that any smart campaign can't see Marketo landing page so we are not able to track it. Is there any way how to do so? Any munchkin?

Thanks a lot,

Jan