Litmus tracking code error

Anonymous
Not applicable
I have been adding the tracking code provided by Litmus within the body of my Marketo email. However, Marketo keeps automatically altering the code after I save it and then I reaceive the following error in Litmus.
Looks like we found the tracking code, but it wasn't fully there. Try pasting the code again and resend your email.
Has anyone else had this issue? Is there a way to resolve this from happening?
Tags (1)
20 REPLIES 20
Matt_Stone2
Level 9
Hi Alan -- that's correct. You can't use dynamic content and email scripts at the same time, unless Marketo has changed that in the past few months.
Anonymous
Not applicable
Hi Matt S, in regards to your last comment about segmentation within the email, are you referrinf to dynamic content for different audiences?
Matt_Stone2
Level 9
Also, it's important to note that if you use any sort of segmentation within your email, you CAN'T use email scripts (thus my method wouldn't work).
Matt_Stone2
Level 9
Hi Dede, did you follow my step-by-step instructions and still weren't able to get it to work?
Anonymous
Not applicable
I spent about 4 hours working on this and still can't make it work. Customer support was completely unhelpful and gave me canned answers.
Anonymous
Not applicable
It should be noted that in order for the tracking code to work, you can't use Send Sample. You have to create a new lead with the testing address provided by Litmus using the instruction in Step 3 found here:
https://community.marketo.com/MarketoArticle?id=kA050000000L7c9CAC

After that, you can test your email using a Single Flow Action:
https://community.marketo.com/MarketoArticle?id=kA050000000KytDCAS
Anonymous
Not applicable
Hey Alison,

I've noticed the same thing. Marketo parses the HTML (including your litmus snippet) and then takes the <style> code block generated, segregates it away from the tracking pixel <div> and <img> tag it also makes. 

The real question is, have you tested a Litms-tracked send and found that you're not tracking any behavior from your audience?

I really like what Matt has outlined above. That's a great solution to the problem and worth trying out.
Matt_Stone2
Level 9
I've been able to use the Litmus tracking code, but it's a little trickier than their instructions let on. Here's how you do it:

  1. When setting up your email program in Marketo, click “My Tokens” on the program dashboard
  2. Add an “Email Script” token
  3. Name the token and click “Click to edit”
  4. On the right, underneath “Standard Objects,” expand the “Lead” category. Find the “Email Address” field and check the box
  5. In the empty script space on the left of this same page, paste in the tracking code provided by Litmus
  6. In the Litmus code, replace every instance of {{lead.Email Address}} with ${lead.Email}
  7. Click Save to close the lightbox window and click “Save” again on the tokens page
  8. Make note of the name of the token (e.g. {{my.Litmus Analytics}} )
  9. Open the email you want to track (not the template, but the email itself within Marketing Activities).
  10. At the very bottom of your email, place your new script token. You can also add default information to match Litmus’ (e.g. {{my.Litmus Analytics:default=noemail}} )
  11. 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 template
raiashutosh
Level 2

Content edited by moderator with corrections.

Hi,

 

I tried the email script token, it seems the code only works if added just above the </body> tag, which is only possible if you email doesn't have any dynamic content.

SanfordWhiteman
Level 10 - Community Moderator

... it seems the code only works if added just above the </body> tag, which is only possible if you email doesn't have any dynamic content.

As noted in the other thread, this is not true. It’s perfectly possible to inject a custom <img> tag via Email Script and also have dynamic content elsewhere.

raiashutosh
Level 2

@SanfordWhiteman 
Just adding the <img> tag will only give of open leaving out important metrics, If we add the litmus tracking in the module, Marketo parsed the HTML  and stripped of all the litmus tracking keeping just the <img> tag which affects the tracking in litmus.

Kim_Gandy1
Level 7

I have one tracking code on multiple emails. Will the tracking pixel only fire once per user? For example, if a lead opens all three emails, only one open will be recorded in analytics?

Matt_Stone2
Level 9

I'm purely speculating -- but I'm guessing it would fire only the one time, since it's using the email as an identifier. You might check with Litmus to be sure, but if you want each email to record differently, I'd make three unique codes.

Hiram_Cruz
Level 2

Hey Matt, thanks for posting this.

For Step #6, I don't see any {{lead.Email Address}} in the tracking code but I see {{lead.Email Address:default=noemail}}

Should I replace the whole thing so it just reads like this:

${lead.Email}

Or

Should it read like this: ${lead.Email}:default=noemail}}

Also, for step #10-- I inserted the token at the "bottom of the email" but when I send it out I get the title of the token in text:

Capture.PNG

How should I insert the token without it displaying it as text???

Regards,

- Hiram

Matt_Stone2
Level 9

Hi Hiram,

For your first question -- yes, replace the entire thing.

For your second question -- did you use any dynamic content in the email? If you did, you will be unable to use the tracking code at the same time. It's an unfortunate limitation of Marketo.

Anonymous
Not applicable

Hi Matt,

Thanks for the information. However, I've done everything you've outlined - on an email that's neither dynamic or using segmentation - and it's still not working for me.

The only thing I haven't done is what user 40030 describes here:

It should be noted that in order for the tracking code to work, you can't use Send Sample. You have to create a new lead with the testing address provided by Litmus using the instruction in Step 3 found here:

https://community.marketo.com/MarketoArticle?id=kA050000000L7c9CAC

After that, you can test your email using a Single Flow Action:

https://community.marketo.com/MarketoArticle?id=kA050000000KytDCAS

Are these necessary steps for testing? Thanks in advance for any help you might be able to provide.

Matt_Stone2
Level 9

You should be able to use the send sample to test the tracking code, unless something has changed since I originally posted this. What is the result you're getting exactly?

Anonymous
Not applicable

When I send the test during the creation of the tracking code (in Litmus) it says that it's not detected. When I send again after it's been created, it doesn't do anything.

Matt_Stone2
Level 9

I just tested it again and it works. Make sure that when Litmus gives you the tracking code, you're replacing every reference of {{lead.Email Address}} with ${lead.Email} -- and also make sure that you've checked the box next to the Email Address field in the objects list when creating the email script token.

Screen Shot 2016-02-16 at 11.31.21 AM.png

I sent a sample of my email with the code and the draft approved to the email Litmus gave me and it received it and started my tracking without any problems.

My code looks like this (removed beginning of the unique tracking link which Litmus provides):

<style data-ignore-inlining>@media print{ #_t { background-image: url('TRACKINGLINKFROMLITMUS?p&d=${lead.Email}');}} div.OutlookMessageHeader {background-image:url('TRACKINGLINKFROMLITMUS?f&d=${lead.Email}')} table.moz-email-headers-table {background-image:url('TRACKINGLINKFROMLITMUS?f&d=${lead.Email}')} blockquote #_t {background-image:url('TRACKINGLINKFROMLITMUS?f&d=${lead.Email}')} #MailContainerBody #_t {background-image:url('TRACKINGLINKFROMLITMUS?f&d=${lead.Email}')}</style><div id="_t"></div>

<img src="TRACKINGLINKFROMLITMUS?d=${lead.Email}" width="1" height="1" border="0" />

Anonymous
Not applicable

Thanks Matt. Sorry for the delay. I believe that's exactly how I was doing it, but I'll try again to verify.