Reposting it here for the community.
In our first post, we discussed the concept of URLs and UTM tracking. Now that those are in place, we will dive into the setup with Marketo. Here are the high-level steps:
- Create the UTM fields in order to have a place to store the values
- Add the fields on your form pages as hidden fields, add to a landing page
- Setup the Marketo programs and/or smart campaigns to process them
- Test and check to make sure it's working
Step 1 - Create UTM fields
If you are setting this up for the first time, or you have inherited a Marketo instance, I recommend checking to make sure these fields are not already in place, or they exist, but are named something else. If you have access, go to Admin > Field Management, and search for any fields containing "utm" or "ppc" to see if they are there. In the screenshot below, you'll see that all 5 fields have been created and are currently mapped to the SFDC lead and contact records. *Side note: The mapping is important if you want the values for leads or contacts since SFDC treats them differently. Also, if you are creating them for the first time, make sure to do it in SFDC and wait for the fields to sync to Marketo or you'll have to get it re-mapped.
Step 2 - Add fields to your forms
Now that you have the fields created, add them to any relevant data forms. There are two main options for this.
- If your website uses custom non-Marketo forms, ask your web developer to add the extra fields to the forms and make them hidden. In the field management screen, there's an "Export Field Names" button which will export all the necessary fields that you can provide to your developer. The file provides a mapping for the UTM values that need to be written to from the website form field to the Marketo field. There might be other options such as native plugins that might already accomplish this.
- If you are adding them to a Marketo landing page, drag those new fields onto your forms and make them hidden. In the Autofill property, choose Edit and you'll see options to chose where the field values will populate from. Choose URL Parameter and type in "none" for the default value or anything that you can filter on later to troubleshoot if it's not working.
At this point, the landing page is just waiting for a referring visit with UTM values. Consider what happens when someone clicks a link, but does not sign up right away? The values from the URL parameter must be present at the time of submission in order for this to work. So if someone navigates away and the parameters disappear, then the UTM values will not be captured. To solve for this, we have created a tracking script that will store any UTM parameters it finds into a cookie. Now when a visitor fills out a form that contains the hidden UTM values on a form, the cookie will store the UTM value across the main and subdomains. *Technical Stuff: You can upload the extracted file into the images directory or on your web server. Before doing so, take note to make one change to the file and re-save it for it to work. Open the file with any text editor and looking for a line that says "domain=digitalpi.com" and change it to your domain. Once set, it won't expire for another 365 days. The script should be place where your Munchkin script is also placed. It's a simple script that does the following.
- If UTM parameters are present, store those into a cookie. This means if it comes from a URL and it's the first time seeing it, the script creates the cookie.
- If the visitor comes back by clicking another link with different UTM parameters, it will replace with the new ones and continue to do so.
- It's not session specific which means if the visitor closes the browser and comes back at a later date, it will still be in the cookie and keep it for 365 days.
Here's a link to the tracking script: dpi-ppc-tracking-script.js.zip So that you can see this process in action, I created a simple form with visible UTM fields on a landing page. When you click on one of the sample links, you should see the UTM values in the UTM fields where they would normally be hidden. If you want to experiment with it, change any of the UTM values after the equal sign and refresh the page. You'll see the new value populated in the field that was changed. Long version: http://info.digitalpi.com/Marketo-UTM-Sample-Page.html?utm_source=blog&utm_medium=email&utm_term=utm&utm_content=utm-tracking-blog-p2&utm_campaign=blog-sub Shortened version: http://goo.gl/O6VyL9
Step 3 - Setup Marketo processing
This next part is just ordinary Marketo smart campaign building. Setup the trigger filtering on UTM values. Make sure it's unique enough to process for the individual UTM parameter (campaign, source, medium, etc.).
Step 4 - Test and validate
Create a few URLs to your landing page and use different combinations of UTM parameters and click on your form submission. Look for the test record and in the custom fields look for the values. If they are there, it's working properly. Keep in mind these values will change each time a new set of UTM values are set. You can run reports on the different campaigns or even down to the add level if programs are setup to track that.
This feature is used frequently, so we hope this article saves a lot of time and frustration. Happy Marketing!!