Re: How to get cookied

Danny_Tran5
Level 3

Hi all,

I was under the impression that the two ways to get the Munchkin cookie were to, A. Fill out a Marketo form, B. Click a link in a Marketo email delivered to you that directs you to the website. (reference http://developers.marketo.com/javascript-api/lead-tracking/configuration/ ).

However it appears that Visits Web Page activity is only working for leads who have performed action A with our tracking. I've ran through several different scenarios to confirm this issue.

Has anyone ever run into this problem? The tracking issue is for our website here, EVSE | Electric Vehicle (EV) Charging Stations - ChargePoint.

Any help or insight would be appreciated.

Thanks so much,

Danny T.

17 REPLIES 17
Denise_Greenb12
Level 7

Hi Danny,

Could you describe how you are testing that is resulting in visitors not becoming known who click links in Marketo emails directed to your site?

Denise

Danny_Tran5
Level 3

Of course.

I've tested tracking with myself and a coworker who have recently filled out forms for testing. The tracking works perfectly fine for both of us. However, when three other coworkers who are in the database but do not test forms (shown in their activity log) browses the site, nothing is logged. I then had these three coworkers click an email link to associate their lead records and then browse the site, but still nothing.

So then I created a test lead by filling out a form, and then I browsed the site, and the visits were reflected in the activity log.

I then created a lead manually in the database and clicked a link to associate the lead record in a different web browser. The web page visits did not log.

Denise_Greenb12
Level 7

Hi Danny,

It sounds like my question was superfluous because Sandy found the problem (great going, Sandy!).

Denise

SanfordWhiteman
Level 10 - Community Moderator

I'll need more than just the website. What you have to show is a tracked link in a Marketo email that directs to a page on that site.

Also, because it's important to be exact for future searches, it's not that you only get a Munchkin cookie using the methods you've described. You get a Munchkin cookie whenever you visit a site that runs Munchkin! That cookie gets associated with a lead in your Marketo database using one of the following methods:

  • filling out a Marketo form
  • visiting a tracked link that then attaches the mkt_tok query parameter to the URL on your site
  • programmatically calling the Munchkin API associateLead method from the browser
  • calling one of a few REST or SOAP API endpoints (Push, Sync, Associate)
Loren_Robeck
Level 2

Hi Sanford Whiteman​,

I have a related question about cookies and utms. Our performance marketer spends a few minutes every morning checking a smart list for leads that have a first page visit with paid UTMs and a subsequence form fill that didn't capture the UTMs. In this example, I think it's because they visited multiple pages in between, though sometimes I think it's because the cookie expired 30min or more later. What is the recommend method to solve for this gap? I imagine it's very common, and have read quite a few posts and external sites including your blog about this topic, as well as custom JS to implement on your site.

Here are some screenshots that I hope display an example clearly.

Lead's Page 1 of Activity Log:

Initial Activity Log.png

First page visit with UTMs, at 12:06pm

First page visit with UTMs.png

Form fill with no UTMs - on this page The Beginner’s Guide to Automation Triggers | Tray.io

Form fill with no UTMs.png

Thanks in advance!

Loren

Denise_Greenb12
Level 7

Hi Loren,

If Sandy doesn't have some way of perpetuating the original utm parameters as the visitor progress through your site, the way I've solved this is to set a time limit and credit the lead to paid search if they filled out a form within, say, 20-30 minutes of visiting your site with the utm parameters being tracked. For example:

Smart List -

Trigger: Filled Out Form->Form Name

Filter:

Visited Web Page->is any

Query String contains: <utm parameter string>

within past 20 minutes

Flow  (depending upon your schema, something like this...) -

Source = Paid Search

Lead Source Detail = Google

Denise

Loren_Robeck
Level 2

That makes sense, good suggestion Denise.

SanfordWhiteman
Level 10 - Community Moderator

If Sandy doesn't have some way of perpetuating the original utm parameters as the visitor progress through your site

(Certainly do, but you have to search for it in my past posts...)

The problem (well, one of them!) with a Smart List-based approach, in addition to not sanely covering the infinite permutations of UTM codes that are possible over time, is that it's limited to 90 days at the absolute max.  For all but the shortest cycles this isn't acceptable. With a 2-year cookie only being able to look back 90 days is shooting yourself in the foot.

SanfordWhiteman
Level 10 - Community Moderator

I think it's because the cookie expired 30min or more later.

Munchkin cookies don't expire in 30m, so it's not that!

It looks at a glance like you're missing a UTM persistence library: JS, loaded on every page of your site, that intelligently stores and forwards UTMs across pageviews + touches.

Such libraries definitely can have a built-in timeout (though the typical default would be to wait for new UTMs to come in and store the previous ones until that point).

There are many such libraries, including those I've written myself, but I can't recommend any here due to Community rules.

Loren_Robeck
Level 2

Ah, thank you!! I've found your blog post on "quick-and-dirty-utm-forwarder". That sounds like the ticket! Will work on implementing with our devs. Thank you as always.

I see from Googling and reading developer docs, that Munchkin expires after 730 days! woot.

Danny_Tran5
Level 3

Gotcha. That definitely makes more sense than how I described it.

Here's the an example email link I used on a test lead:

http://go.chargepoint.com/MO0C0f0SW4xik00aa0aY0c0

Or do you need the full "original view" of the email?

SanfordWhiteman
Level 10 - Community Moderator

The problem is very simple: your webserver is (mis)configured to strip off the entire query string and redirect (that's a true HTTP redirect, not a JavaScript-based redirect) to the bare hostname + pathname.

So a link like

https:​//www.chargepoint.com/drivers/home/holiday?utm_source=retargetingpromo&utm_medium=email&utm_campaign=19q4_em_b2c_holiday_promo_us&utm_term=b2chome&utm_content=promo&mkt_tok=eyJpIjoiTURBell6WTRZekF4TnpZNCIsInQiOiJVU1hPOFB0U

is redirected to

http:​//www.chargepoint.com/drivers/home/holiday

before Munchkin even loads.

When Munchkin does load, there's no longer a mkt_tok query param in the URL (let alone any utm_ params, it should be noted). Therefore it's equivalent to an anonymous visit to that URL.

This isn't anything Marketo can fix -- your webmaster needs to fix this misconfiguration.

Danny_Tran5
Level 3

Thanks so much for this. I didn't realize that the query parameters were being stripped. I'll reach out to our developer to get this handled.

SanfordWhiteman
Level 10 - Community Moderator

Danny, pls mark my answer as Correct when you get a chance so it'll be easier to find in searches.

Danny_Tran5
Level 3

I didn't post this as a question, so I don't see the ability to mark your response as the Correct Answer. Do you know if there's a way to edit this discussion to mark it as a question?

SanfordWhiteman
Level 10 - Community Moderator

Ah yes, Discussions don't have "answers" unfortunately. Well, next time.

Danny_Tran5
Level 3

Sorry about that. You are always a great help. I'll be sure to use the right type of post next time.