SOLVED

Tracking querystrings from the corp site to marketo pages

Go to solution
Andy_Varshneya1
Level 9

Tracking querystrings from the corp site to marketo pages

Hi,

We run PPC ads that take leads to one of a few pages on our corporate (www.XXXXXXXX.com) website. These links all have querystrings that track the source (i.e. www.XXXXXXXX.com?source=PPC). Now from here, these leads are clicking on links to download assets, and these asset download landing pages are on Marketo pages (i.e. info.XXXXXXXX.com/asset.html) and the forms on these landing pages have hidden fields that watch for such querystrings. We want to credit PPC campaign for this download since that's how the lead came in.

Should I set the hidden fields to dynamically populate the fields from the cookie and watch for that parameter? Is there another way to do it?

Sorry, I'm not sure I entirely understand how Marketo cookies work on non-Marketo pages.


Thanks,
Andy
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Tracking querystrings from the corp site to marketo pages

Hi Andy -

I have provided the code I used to do what you are trying to achieve in this post: Solution to using UTM parameters & cookies to capture lead source information

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Re: Tracking querystrings from the corp site to marketo pages

Hey Andy, 
If you can store the query parameter in a cookie on the same domain, Marketo will be able to pull it into a hidden field. This would be a great way to transfer the query parameters to the Marketo form. 

Just keep in mind that the cookie the query parameter is stored in must be on the same domain that the page the Marketo form is on.

Best,
Will
Andy_Varshneya1
Level 9

Re: Tracking querystrings from the corp site to marketo pages

Hi Will,

Yes, ideally, that would be the best case scenario. However, the visitor is first browsing our corporate website before going to a Marketo landing page in the same browsing session. Think of it as a lead coming into www.marketo.com from a paid ad and browsing around before trying to download an eBook from pages2.marketo.com.

We want to credit that original ad that brought them to the www.marketo.com page as the lead source when they download the asset from the pages2.marketo.com landing page. How do we carry the information in that querystring from the www.marketo.com domain to the pages2.marketo.com domain?
Grant_Booth
Level 10

Re: Tracking querystrings from the corp site to marketo pages

Hi Andy,
The cookie is stored at the domain level, not the subdomain level, so it would be accessible from pages on both www.marketo.com and pages2.marketo.com.

Anonymous
Not applicable

Re: Tracking querystrings from the corp site to marketo pages

Hey Andy,
Cookies can work across subdomains. So a pages2.marketo.com shuld be able to pull data from a cookie created on www.marketo.com.

I found a discussion here: http://serverfault.com/questions/153409/can-subdomain-example-com-set-a-cookie-that-can-be-read-by-example-com which goes over this.

Alternatively, the query parameters should be logged in the "Original Referrer" field, which you may be able to pull from if you have a limited number of values for your query parameters.

For example, you could create the following campaign:
Smart List:
Lead is Created (trigger)
Original Referrer contains '?'
Flow:
Change Data Value: Lead Source
   Choice 1: If Original Referrer contains 'PPM'
       New Value: Paid Advertising
 

And keep adding choices for your different query parameter values.

Best,
Will
Andy_Varshneya1
Level 9

Re: Tracking querystrings from the corp site to marketo pages

So maybe pages2.marketo.com was a bad example (or I'm not understanding).

info.XXXXXXXX.com is the set of pages we have setup through our Marketo instance while www.XXXXXXX.com are our set of pages sitting on our servers. Are you saying they're both on the same domain and thus the cookies created on www.XXXXXXXX.com should be accessible by info.XXXXXXXXX.com too?
Anonymous
Not applicable

Re: Tracking querystrings from the corp site to marketo pages

Cookies is one route if you have the techincal reources to do that.

The other option is to use a querystring filter. Basically, if someone does something (like fills out a form, visits a certain page, etc), the trigger will look back X minutes to see if the query string was used.

I tend to use these on oneoff jump pages that sit in front of a landing page. A good example is a roadshow landing page that gives the high level event details. This is where you are sending all of your advertsing traffic with trackable URLs. If the person then fills out a form on the Los Angeles location page, this type of trigger will capture the original URL parameter values from PPC or other online ads.

0EM50000000SYVM.jpg

 
Anonymous
Not applicable

Re: Tracking querystrings from the corp site to marketo pages

Does anyone have example code they can share that stores a querystring parameter from a website visit and passes it to a hidden page on the form on the Marketo landing page.

Just like in Andy's original question, we are sending people to our website where they then click through to the Marketo LP with form. Thus, the parameters on the original URL are lost and not available to capture in hidden fields in the form.

I understand it's not too hard to capture the querystring parameters in a cookie and then read those back in the form, as Will suggested above. Any examples to share of the JavaScript to do this?
Anonymous
Not applicable

Re: Tracking querystrings from the corp site to marketo pages

Hi Andy -

I have provided the code I used to do what you are trying to achieve in this post: Solution to using UTM parameters & cookies to capture lead source information

Andy_Varshneya1
Level 9

Re: Tracking querystrings from the corp site to marketo pages

Hi Evan,

This is awesome stuff, and congrats on figuring out the code yourself!

I was able to get with some of our developers and build essentially the same thing on our end. The issue I'm working through with them now is that the cookies are sometimes read and interpreted correctly, while other times they are not. Haven't been able to recreate the issue consistently. Sometimes on the same browser in the same session the cookie will be read incorrectly and the value will be stored in the HTML translation of the original text.