Skip navigation
All Places > Products > Blog > 2016 > October

Continuing Murta Manzur's blog post: Single Page Application Web Tracking with Munchkin, here is how you can also use the RTP tracking code on single page applications.

A Single Page Application is a website that loads all of the resources required to navigate the site on the first page load. When a user clicks a link the content is loaded from the first page load data. To the user, the website behaves as expected because the URL in the address bar is like the traditional page navigation.

Munchkin works well with traditional websites because Munchkin runs every single time the users load a new page. However, with a single page application if you are not loading a new page, Munchkin will run only once.

The approach I’ll walk through in this post is to track when a user clicks on a link, and then send this information to Munchkin. We’ll implement this using the clickLink Munchkin function. Below is an example implementation in jQuery that binds for click events to the clickLink Munchkin method. When calling the clickLink Munchkin method it passes the parameter for the URL that was clicked.


Implement the following JS code after the Munchkin and RTP tags.


     var urlThatWasClicked =; 
     if(typeof(urlThatWasClicked) != 'undefined'){ 
          Munchkin.munchkinFunction('clickLink', { href: urlThatWasClicked}); 
          rtp('send','view', urlThatWasClicked); 
          rtp('get', 'campaign',true); 

A common question we see in consulting relates to how a customer can use a non Marketo form, but still associate that lead with a known lead in Marketo. With Marketo forms, of course, it's simple, you jhust submit the form. With Non Marketo forms, its a bit tricker, but still possible.


One reason you might do this is because you're submitting a login form, and obviously that doesnt really make sense as a Marketo Form. Not to worry!


First, lets talk about some confusing names of important items related to the Marketo Munchkin Cookie and this process


What is it?
_mrk_trkThe name of the hidden form field (more on that in a moment)
_mkto_trkThe name of the Marketo Munchkin Tracking Cookie. The cookie contains the Munchkin ID of the instance along with a unique identifier for this lead (known or anonymous.


The details on the tracking cooke are shown below. I use a plugin called "Awesome Cookie Manager" to view cookies. You can see yours by going to any site that leverages munchin


Tracking Cookie



Marketo Munchkin Cookie Value


Armed with this knowledge, we can look at the solution here. the process is straightforward and we're helped by Munchkin. When you create a form field called "_mkt_trk" within a non marketo form on a page where Munchkin code is running, Munchkin knows enough to populate the value of that form with the Munchkin Cooke value.


Cool right?


So, what does that mean? That means that in the following really simple non marketo form, youll not only receive the regular form fields.. youll also have the lead's cookie ID as well... and with THAT, you can use REST from your back end process to associate the lead.


That brings us to the second step which is associating the lead. for this youll need the marketo ID and the cookie ID. you've now got the cookie ID, and getting the Marketo ID is a simple matter of getting it from Marketo.


You'll need to call the following two REST endpoints.


first you'll use GetMultipleLeadsByFilterType, passing in the Email address to get the Marketo ID (!/Leads/getLeadsByFilterUsin… )

then, you'll use AssociateLead (!/Leads/associateLeadUsingPO… ), passing in that ID, and the cookie Id.


Alternatively, you can use a amazing new REST endpoint .... "push lead to marketo" which you can read about here!

If you are using  tokens in emails you have probably noticed that if you do not define a default value when inserting the token, Marketo populates language of "edit me" automatically as a default. This is to still give you the option in the email editor to define a default value for whenever the data field of the token is empty without having to re-insert the token.


So what happens if you leave 'edit me' as the default value, will people see this when they get the email and there is no data in the token field? 


Nope.  The system sees it as a null value. Even if you use Send Sample it will not appear, unless you have accidentally deleted one of the brackets around the token. Remember to be extra careful when you are editing {{tokens}} to not remove the brackets, otherwise the whole thing will appear in your email and that would be {lead.token:default=super embarrassing}}.


[Insert final Jeopardy music here]

How many times in a day do you look at your phone or watch or desktop clock – just waiting – waiting for a call, or lunchtime, or the end of the work day. Most of the time we think of waiting as a bad thing – securing a new license at the DMV or anxiously anticipating riding Space Mountain.

Waiting doesn’t always have to be bad and unnecessary. Sometimes things are worth a wait – letting your food simmer a minute longer may make all of the difference, or allowing an extra month for your perfect next home to become available.

How does this relate to Marketo? Wait steps!


Wait steps can be powerful, but there are certain things to keep in mind to avoid wait step dangers.

Common uses for wait steps:

  • Before sending emails (one of the most common uses) – want to separate webinar invites so that one goes out this week and one next week, all in one smart campaign? Throw in a wait step!
  • Changing data values, statuses, alerts, and adding to lists – waiting to see if the email gets delivered before changing the program status to “invited”? Include a short wait step.
  • Sync related – Marketo is syncing constantly, but in short intervals. Sometimes we want to make sure a lead has time to get assigned or get other SFDC values associated before then taking the next flow step, example sending an email from their newly assigned lead owner.

Wait steps even allow not only setting time durations but specifying days, dates, etc. making them a very flexible tool!marketo_wait_steps_3

Wait step dangers:

  • Too many wait steps – it is too easily to go over the top with wait steps. The danger then is not knowing what campaigns are waiting the different intervals and how that is affecting other related campaigns. Tip: use the Campaign Inspector to check out how many wait steps your instance is using – type “Wait” into the search bar at the bottom. You may consider “fast-passing” some of these and removing the wait steps.
  • Changing wait steps – If you want to change the timing of a wait step or add additional flow steps, the wait steps act with a certain behavior (stamping the original wait time and looking for the next numbered step). Keep this in mind as at this point it’s usually easier to build a new campaign.
  • Incomplete campaigns and cancelled campaigns – this is a BIG one, so let’s look at this more in-depth…

Can’t finish what you started?

Example: You have a campaign set to send one email, then wait 2 weeks and send a second email. You all of a sudden realize that the second email never got finalized and there’s no material. Or perhaps the marketing campaign got cancelled. What do you do? Usually you would navigate to the schedule tab and deactivate that campaign. Does this do the trick? No.Once leads are in the flow and in the wait step, they will continue on whether the campaign is deactivated or not. You could find yourself dealing with a database receiving a lorem ipsum email – leading to higher unsubscribe rates, spam issues, and overall untrusting prospects/customers.Instead, when you want to “finish the un-finished” you can do a few things:

  • Remove leads from the campaign flow – build a simple smart campaign like this:
    • Smart List: Member of campaign xyz (extra hint: if they have already started getting the junk email or running through the junk flow step you can add that extra criteria here to speed up the other leads being removed)
    • Flow: Remove from flow xyz
  • Remove the flow steps following the wait step. Just delete the following flow steps and when the lead is done with the wait, nothing will happen. This has to be done before in advance.


Your waiting is over, get back to it!

All in all, wait steps are very powerful tools in Marketo but they can also be tricky. Keep the above points in mind when using them – use them sparingly when it makes sense and be prepared to remove leads from flows if necessary.

And now the wait is over – get back to it!

Marketo Wait Steps: Beware of These Hidden Dangers! - LeadMD

In case you missed it, Marketo just introduced with the Summer 16 Release our new integration with Vibes, a terrific new way to leverage SMS within Marketo. Isn't it great? But many of you have been using, and may continue to use, the services of Twilio, one of our other wonderful Launchpoint partners.


I've previously posted about using Twilio for SMS and wanted to share a few quick thoughts on some additional lessons learned:


I recently received a request to include fairly long URLs with querystring parameters within some SMS messages my client was sending out. Obviously, SMS messages with a long URL could cause an issue - though Twilio does offer messages over 160 characters with its Messages Resource UI. However, Twilio also offers automatically URL shortening, which is probably advised as a very long link with querystrings is not particularly attractive in an SMS message. We did test this functionality and it does work as expected, with query string parameters being preserved with URL shortening.


One thing that is important to understand, though, is that with regard to being able to measure/report on link clicks, this is not something that is out-of-the-box supported with Marketo's analytics tools. There is no "clicks link in SMS" filter to use for smart lists. If you've used a unique querystring for the message, you can create a web page performance report to show known or anonymous leads that visited the page with that querystring. (And of course, if you have Google Analytics or similar, you would see the traffic there as well.)


Keep in mind, people may be cookied on their computer but not necessarily on their phone - it depends on if they've previously engaged with your emails on their phone, going to a munchkined page on that device. So using a "Visited Web Page" smart list to look for that querystring will only show you known leads who visited that page with their cookied mobile device - and that may be a lower number.  (I know for myself, I will typically read emails on my phone but if there's a link to a website, I may wait to do so when I'm back on my laptop, as many pages are, sadly, still not as mobile-optimized as they could be.)

Filter Blog

By date: By tag: