How to insert a Litmus tracking code with Marketo

      To add a Litmus tracking code to your HTML in Marketo, you can simply follow our steps for creating and adding a tracking code.

      If you do not have access to edit the HTML in Marketo, you can set up the tracking code using Email Script Tokens.

      NOTE: Using a custom Marketo token to dynamically include the tracking code in your email will prevent Integrated Insights from including the Litmus data. We recommend including the tracking code in your raw HTML.

      1
      When setting up your email program in Marketo, select My Tokens on the program dashboard. My tokens section of the program dashboard
      2
      Drag Email Script to the middle panel to add it. Name the token and select Click to Edit. My tokens section with email script highlighted
      3
      On the right, underneath Standard Objects, expand the Person category. Find the Marketo Unique Code field and check the box. Ensure you check the box next to any custom parameter you will be using in your tracking code.

      IMPORTANT: You need to enable personalized URLs for your Marketo account in order to use Marketo Unique Codes.

      Edit script token lightbox window with Marketo Unique Code checked
      NOTE: The default merge tag for Marketo is {{lead.ID}}, but this is not available for selection as a script token. Marketo Unique Code is an alternative unique user identifier (UUID).
      Any merge tag or custom parameter used in your tracking code must be in Marketo's Email Scripting language e.g. ${lead.Marketo_Unique_Code} rather than {{lead.Marketo Unique Code:default=nocode}}.

      TIP: To find the correct syntax to use for an attribute chosen in step 3, drag and drop it on the Edit Script Token space. 
      4
      In the Litmus code, replace every instance of {{lead.ID}} with  ${lead.Marketo_Unique_Code} (if you use the tip below you can skip this as it will already be done).

      TIP: You can select Other as the ESP when creating a tracking code and insert ${lead.Marketo_Unique_Code} or your chosen merge tag to avoid the manual replacement.
      5
      In the empty script space on the left of this same page, paste in the tracking code provided by Litmus. 

      Select SAVE to close the lightbox window and select SAVE again on the tokens page.

      6
      Make note of the name of the token (e.g. {{my.Litmus Tracking Code}} ).

      Open the email you want to track (not the template, but the email itself within Marketing Activities).

      At the very bottom of your email, place your new script token.

      When the email is sent, the script will be placed into the email at that spot without the Marketo WYSIWYG editor modifying the code and without having to alter your email's HTML.

      Marketo also has this documented on their website with screenshots. For alternative Marketo merge tags, this Marketo article may be useful.

      NOTE: If you use Send Sample, you won’t see the Marketo Unique Code value in your exported results (it will simply show as ${lead.Marketo_Unique_Code} in the custom_id column unless you specify a person during the send sample).

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us