SOLVED

Re: Cookie **** - how to fix many broken tracking cookies?

Go to solution
Anonymous
Not applicable

Cookie Hell - how to fix many broken tracking cookies?

Short version:

Among other cookie problems, we keep archived copies of newsletters available from a particular page on our website. It turns out that the way these pages were added were by viewing our communications director's web version of an email, pasting into a text doc, and saving as HTML. That means that anyone who has visited these pages before they filled out a form - and therefore we have "identified" them - are tied to her account, as near as I can tell.

We have been doing this for more than a year.

We will fix or pull down the newsletters, but I'm trying to figure out a way, programatically, to delete the cookie if an ID is found that is tied to that account. This would be very useful for us, because we have other, similar problems, going on. I know how to delete a cookie (lol) - I just don't know how to identify a particular cookie as being tied to a certain Marketo account.

Essentially, if anyone has a cookie that is tied to her account, or the announcements account, I want to kill that cookie, and in the best of all worlds, drop a new cookie.

Suggestions?

Long version:

We're a travel company with (I am guessing) a fairly standard implementation of Marketo.

However, our "CRM" is actually our quite-antiquated booking system. For many reasons, the data in the booking system takes priority over the data in Marketo. Consequently, all of the forms on our website post through to a PHP "gateway", that first checks the information in Traveller (the booking system), does whatever is needed there (e.g. orders a print catalog), and THEN posts to Marketo, using SOAP. We've also made modifications to Traveller so that any time a client record is added or edited, it synchs the info with Marketo.

Overall, this has worked very well.

We decided to build sort of a "cart abandonment" routine. It's tricky, because more than half of our clients shop on the web and book by phone. So we started looking at modifying Traveller to write a tiny bit of booking info to Marketo. Not a big deal, until we looked a little harder at Marketo Cookies.

The first thing that I noticed is that my data, personally, was only haphazardly tracked in Marketo. All of the form stuff worked, but the web page tracking was non-existent, especially for the past couple of months. It made it a little difficult to test tracking.

After a bit of research, I realized it was because I have THREE Marketo accounts (for various reasons), plus our communications director sends "test" emails to me, plus there is one going to the company-wide announcement list. I could have clicked any of them. So I read many, many forum posts, and I sort of figured out what was going on. (I say "sort of" because filling out a form did not fix the cookie tie, though the form registered, yet clicking a link in an email addressed to me DID fix the problem, and from what I've read, it shouldn't have.)

I thought all was mostly good, and then started thinking through how it affected tracking our clients. One of the first walls that I hit was our newsletter, as mentioned above. There are also cases where a client uses a throwaway or personal email address to sign up for emails and whitepapers, but uses their "real" email address in our booking system. I'd like to be able to fix/require these, as well.

In some cases, if it is an active client with a booking, I should be able to identify a problematic account, and delete their cookie, and perhaps perform a silent post or something to reacquire the client. But in the case of thing like this newsletter problem, I don't really get how to determine that a user is tied to our communication director's account (or our announcement account, etc.), so that I can delete the cookie and start them out fresh.

Bottom line is that some people "abandon the cart" but actually book by phone; some people never reach the "cart" stage. And even people who DO go all the way through the process, and book online, if they have a prior cookie attached to another account, like anyone who happened to have clicked one of these newsletter links staright-away...it's not going to help that the form posts to Marketo, because the form post isn't going to match their history.

I'll take any suggestions, regardless of how weird they may sound.

FYI, our booking system is classic ASP which we've augmented with PHP and jQuery. The website is primarily classic ASP with lots of javascript/jQuery, and some PHP add ons. We may be switching booking systems and website shortly, but in the meantime, we're in prime season, and kind of at a loss.

(Also, the thing that started all of this - cart abandonment: We can post booking data to the client's Marketo record, but then - especially for non "marketing" clients - we need to get them to click a link or *something* to tie them back to their Marketo record. My boss says the only thing he could think of was "Free Chocolate!" but we'd rather not do that. lol. My next questions will probably be regarding triggering transactional emails from Marketo.)

Thanks,

Julie Siebel

1 ACCEPTED SOLUTION

Accepted Solutions
Kenny_Elkington
Marketo Employee

Re: Cookie Hell - how to fix many broken tracking cookies?

If you know the id of the lead to which these records were erroneously tied, you can retrieve that record's cookie list by adding 'cookies' to the fields list in a Get Lead by ID REST call.  This will give you a list of cookies which you can purge(or reassociate if you know enough about the visitor)

View solution in original post

10 REPLIES 10
SanfordWhiteman
Level 10 - Community Moderator

Re: Cookie **** - how to fix many broken tracking cookies?

You can use the SOAP API to query by cookie value to get the associated Named or Anonymous Lead.

You can't use SOAP to query by lead ID to get currently associated cookies.  But I've never found a situation where that direction is strictly necessary.

If at any point in your process you have access to a lead key (by ID or email) and a cookie you want to associate with that lead, you can run SOAP SyncLead/REST AssociateLead/Munchkin::associateLead.

If you really want to scrub current cookie associations that match a particular ID, you could, I suppose, use your web server logs to get the recently active cookies (depending on how long you keep your logs), check their current association, and associate them with some dummy lead instead, leaving open the possibility of reassociating it later when you have access to more info.

Also, of course, if a cookie is associated you will be to populate tokens or fields accordingly... on a Marketo LP, that is. You can use some tricks to do the same on third-party domains but you'll need to be pretty front-end savvy.  The Known Lead HTML on a form can be leveraged a little bit: it doesn't have full token access, but if you're seeking a specific first name/last name (you could change the name to make sure it's unique, like using a GUID for the last name of something) it could be helpful.

I'd recommend you engage someone who's really experienced with the kind of Munchkin "forensics" you're seeking.  It'll save you a lot of time.

Kenny_Elkington
Marketo Employee

Re: Cookie Hell - how to fix many broken tracking cookies?

If you know the id of the lead to which these records were erroneously tied, you can retrieve that record's cookie list by adding 'cookies' to the fields list in a Get Lead by ID REST call.  This will give you a list of cookies which you can purge(or reassociate if you know enough about the visitor)

SanfordWhiteman
Level 10 - Community Moderator

Re: Cookie **** - how to fix many broken tracking cookies?

If you know the id of the lead to which these records were erroneously tied, you can retrieve that record's cookie list by adding 'cookie' to the fields list in a Get Lead by ID REST call.  This will give you a list of cookies which you can purge(or reassociate if you know enough about the visitor)

Y'can?

https://410-xor-673.mktorest.com/rest/v1/lead/99999.json?access_token=...-80a3-4b68-b1db-...&fields=...

{

     requestId: "960b#150cfe0024a",

     result: [

     {

          id: 99999,

          lastName: "Whiteman"

     }

     ],

     success: true

}

https://410-xor-673.mktorest.com/rest/v1/lead/99999.json?access_token=...-80a3-4b68-b1db-...&fields=...

{

     requestId: "d025#150cfdeac6c",

     success: false,

     errors: [

     {

          code: "1006",

          message: "Field 'cookie' not found"

     }

     ]

}

Kenny_Elkington
Marketo Employee

Re: Cookie **** - how to fix many broken tracking cookies?

My bad, 'cookies' not 'cookie'

SanfordWhiteman
Level 10 - Community Moderator

Re: Cookie **** - how to fix many broken tracking cookies?

Nice!  Undocumented, eh?

Kenny_Elkington
Marketo Employee

Re: Cookie Hell - how to fix many broken tracking cookies?

More like unadvertised.  It's available via Describe Lead, but we haven't gone out of our way to point out its availability.

Anonymous
Not applicable

Re: Cookie **** - how to fix many broken tracking cookies?

I will give this a shot as soon as I figure out what our access_token is.

Someone else - who is no longer with our company - did the PHP Gateway connection to Marketo, and used SOAP rather than REST, and I'm kind of going off what he did.

This sounds very promising, though, and I will let you know as soon as I try it!

Anonymous
Not applicable

Re: Cookie **** - how to fix many broken tracking cookies?

Ah - not letting me edit, but yep, I see how to get that token. Fingers crossed!

Anonymous
Not applicable

Re: Cookie **** - how to fix many broken tracking cookies?

Thanks Kenny and Sanford both! This works beautifully.

(And yes, 28 cookies associated with our Communications Director's account!)

I'm just going to expire the cookie if it contains one of these cookie IDs. A lot of these people are likely on one of our mailing lists, so once I've killed the cookie, they'll click a link and bam, we've got 'em back.

In the interests of someone finding this via search:

how retrieve a list of cookies associated with an account

how to retrieve cookie by lead ID

Thanks again, guys.