If you want to be notified with updates to the Marketo Developer Blog, you can add the Marketo Developer Blog RSS Feed to your RSS reader of choice. Marketo Developer Blog RSS Feed: “http://developers.marketo.com/blog/feed/“
Category: How-To
Best practices, examples, and more.
Clearing Marketo Tracking Cookie from Forms 2.0 Submission
Overview Forms 1.0 contained the value for the Munchkin tracking cookie as a field in the DOM. This was submitted along with all of the other inputs. Forms 2.0 omits this field, and dynamically populates the value upon submission rather than on form load. While this is generally acceptable, it does creates a class of … Continue reading “Clearing Marketo Tracking Cookie from Forms 2.0 Submission”
Add Custom Code to a Marketo Landing Page
Let’s say you would like to add a third-party tracking script, such as Google Analytics to your Marketo landing page. This is possible via the Marketo UI. More generally, you can add any custom code (HTML, CSS, JavaScript) to your Marketo landing by following the instructions below. 1. Select your landing page and click on … Continue reading “Add Custom Code to a Marketo Landing Page”
Restrict Free Email Domains on Form Fill Out
Let’s say you would like to restrict site visitors from submitting a form with a free email domain, such as Gmail or Yahoo. To accomplish this, include the script below in the source code of the page with the Marketo form. It will check if a user entered a non-business email (Gmail, Hotmail, etc.), and … Continue reading “Restrict Free Email Domains on Form Fill Out”
Delete Marketo Tracking Cookie
Additional Note: This method should only be used if the desired effect is to remove the cookie entirely. In most other cases, this method should be used. This code sample can be used to delete a Marketo tracking cookie from a user’s browser after Marketo form submission. It works by calling deleteMarketoCookie method after a … Continue reading “Delete Marketo Tracking Cookie”
Search by Full Name via Marketo REST API
Question: Is there a way to query a lead using Marketo APIs with just a lead’s full name? Answer: It is not directly possible. However, the workaround described below will allow you to do this. 1. Create a custom field called “Fullname” in Marketo. Here’s a blog post that describes how to do this. 2. … Continue reading “Search by Full Name via Marketo REST API”
Hide Lightbox After Form Submission
Overview The current lightbox embed code generated by Marketo does not disappear when the form is submitted. It will reload the page after form submission, and the form will appear again. If you would like to create a lightbox that hides after form submission, then please follow the steps below. How to Guide 1. After … Continue reading “Hide Lightbox After Form Submission”
Create a Custom Field in Marketo, and Update this Field via API
Let’s say you have additional data about your leads that does not fit into the standard Marketo fields. For example, this custom field could be a third-party score. You can create a custom field in Marketo for your third-party score, and then update the value of this field via either the Marketo REST APIs or … Continue reading “Create a Custom Field in Marketo, and Update this Field via API”
Using Multiple Munchkin Tracking Codes on a Single Page
Let’s say you have multiple Marketo instances and you would like to send web tracking events like page visits or clicked links to these multiple instances, it is possible to do this with Munchkin. Marketo tracks visitors to your website by domain (e.g. “marketo.com”). If you’re hosting this Munchkin script on a domain that’s different … Continue reading “Using Multiple Munchkin Tracking Codes on a Single Page”
Integrating Munchkin with Google Tag Manager
Google Tag Manger lets you add tags to your website. Rather than manually add each tracking script like Munchkin to the source code of your website, you can put Google Tag Manager on your site, and then add tags like Munchkin through Google Tag Manager’s UI. In this post, we’ll first show how to generate … Continue reading “Integrating Munchkin with Google Tag Manager”