SOLVED

Google Analytics, Marketo, Landing Pages... and Regular Expressions?

Go to solution
Anonymous
Not applicable

Google Analytics, Marketo, Landing Pages... and Regular Expressions?

I know my way around Google Analytics pretty well, but haven't used many of the advanced features.  Our company is fairly new with Marketo and I haven't used any of the reporting within Marketo (someone else here does - but my primary focus is our company's website, not the emails specifically).  I'm finding that Marketo has thrown a little wrench into the website data.  Nothing too bad, but I'd love to fix it... and I'm hoping someone else has already figured out how and can explain to me in simple terms how to fix it in Google Analytics.

Issue 1:  How to remove the Marketo Munchkin code from the URL?

When I look at landing pages on Google Analytics, it shows that www.Example.com/page1 is a different page than www.Example.com/page1?mkt_tok=blahblahblahblahblahetc.

So even though 100 people visited one web page, the analytics show that 100 pages were each visited once. It looks to me that I should be able to use a Regular Expression to remove the marketo munchkin code from the URL in Google Analytics's reporting, so that Google Analytics groups all visits under /page1 as one bucket again.  I tried to follow this example, under a Testing Property View Filters, using (.*)/?mkt_tok.* as the Field A -> Extract A; and then $A1 as the Output to  -> Constructor.  Does that look right?  Any concerns I should be aware of?

Issue 2:  How do I fix the go.example.com issue?

Every link in our emails are actually pointed to "go.example.com" instead of "www.example.com".  When you click on the link in the email, it first goes to "go.example.com/blahblahblah" and then instantly redirects to "www.example.com/page1?utm_source=example&lots-more"  So, this is where I'm getting super confused.  The go.example.com displays as a referral in Google Analytics and the traffic spikes don't seem to mirror the spikes of when we send a large email list.  Unlike issue 1, where I can try and remove everything after mkt_tok in the URL, there isn't a pattern at the beginning to filter the "blahblahblahblah"?  Also, since go.example.com/blahblahblah redirects the link... I think /blahblahblahblah is getting the credit as the landing page instead of the actual landing page that it redirects to (or maybe not since it's a referral)??

I'd just love to have the landing page results in Google Analytics be close to accurate, and then to clean up all the extra single visits to webpages that aren't real pages, but are actually just pages with extra Marketo blahblah appended to it. 

Thanks for any help or recommendations from others on how best to clean this all up fairly accurately!

1 ACCEPTED SOLUTION

Accepted Solutions
Courtney_Grimes
Level 10

Re: Google Analytics, Marketo, Landing Pages... and Regular Expressions?

Hi Ryan,

In regards to Issue 1, the view filter regex you came up with WILL work, but because mkt_tok is a standard parameter, I'd just as soon remove the parameter from view rather than set up a regex. It's two different ways of looking at the same solution; the only reason I lean a little more towards parameter exclusion is due to the fact that you wind up needing to do parameter exclusion for Search Console.

For Issue 2, what you're going to want to do is actually block go.example.com as a referrer in Google Analytics. When you have Marketo set up, go.example.com is mainly used for tracking email views/clicks, and is actually different than your Marketo LP subdomain, so it's pretty easy to isolate it for exclusion. If you're using Universal Analytics, it's as simple as going to Admin -> Tracking Info -> Referral Exclusion list and adding the subdomain.

View solution in original post

5 REPLIES 5
Courtney_Grimes
Level 10

Re: Google Analytics, Marketo, Landing Pages... and Regular Expressions?

Hi Ryan,

In regards to Issue 1, the view filter regex you came up with WILL work, but because mkt_tok is a standard parameter, I'd just as soon remove the parameter from view rather than set up a regex. It's two different ways of looking at the same solution; the only reason I lean a little more towards parameter exclusion is due to the fact that you wind up needing to do parameter exclusion for Search Console.

For Issue 2, what you're going to want to do is actually block go.example.com as a referrer in Google Analytics. When you have Marketo set up, go.example.com is mainly used for tracking email views/clicks, and is actually different than your Marketo LP subdomain, so it's pretty easy to isolate it for exclusion. If you're using Universal Analytics, it's as simple as going to Admin -> Tracking Info -> Referral Exclusion list and adding the subdomain.

SanfordWhiteman
Level 10 - Community Moderator

Re: Google Analytics, Marketo, Landing Pages... and Regular Expressions?

Ryan, also to your Issue 2, go.example.com isn't getting credit as a landing page because it isn't running Munchkin (a Visit Web Page activity will not be registered for the branding domain).  The first page you actually land on is still your real landing page.  As Courtney suggests, blocking go.example.com as a referrer will block these confusing (though technically accurate) referrers.*

* Technically accurate because other visits to http://www.example.com/page1 (organic search, PPC, direct) would have different referrers or no referrer at all, so if you were relying on the referrer for attribution -- bad idea, yes -- then go.example.com redirects would be instantly traceable to email.  However, since Clicked Email activities are already logged in Marketo there's little reason to maintain the referrer.

Anonymous
Not applicable

Re: Google Analytics, Marketo, Landing Pages... and Regular Expressions?

Thanks for the help!

Issue 1:  As Courtney suggested, I just excluded the URL Query Parameter mkt_tok from the view (in View Settings).  (No need for me to filter and replace with RegEx and possibly do something wrong when there's any easier way.)  Although, I'm not sure what you're referring to with the "Search Console"?  Am I missing something really important here?

Issue 2:  I'm still trying to decide how I want to fix this... or even if I should fix this?  As Sanford mentioned, this really isn't incorrect data, as the traffic is coming from go.example.com and is then landing on www.example.com/landing-page1 - so the right landing page is getting the credit (I was mistaking the referral path as the landing page path - thanks for correcting me!). 

We add our own URL tracking parameters to our emails, the source/medium/campaign  - so I think these typically over-ride this data in Google Analytics from that, right?  This is where I get confused... if I'm looking at the traffic channel; if it is using our parameters, it should be "medium= email."  However, since "go.example.com" is coming in as a referral, the "medium= referral".  After looking around in Google Analytics- I think we missed adding our own URL tracking parameters to some of our emails... so in those cases it did not have anything to override the medium, so in those cases it displays as a referral.  Does that sound right? 

If that is right, then I probably should NOT add "go.example.com" to the referral exclusion list as it will catch any emails that our team forgets to add our own URL parameters to.  Also, according to the Google support, "any traffic coming from an excluded domain doesn't trigger a new session."  Don't I want email traffic to get recorded in Google Analytics as a new session?  Maybe I'm missing something here?

Again - thanks for everyones help!

SanfordWhiteman
Level 10 - Community Moderator

Re: Google Analytics, Marketo, Landing Pages... and Regular Expressions?

If you're missing the utm_medium and that can be assumed to be "email" for referrals from go.example.com, then you can update the GA info based on that:

ga('create', 'UA-XXXXXXXX-X');

if ( /^https?:\/\/go.example.com(\/|$)/.test(document.referrer) ) {

  ga('set','campaignMedium','email');

}

You raise an excellent point about excluded domains not triggering a new session (basically they are like additional direct or in-site traffic). However, if the user hasn't visited your site in 30m it's going to be a new session anyway.  Also -- though you should test this to be sure -- I think just the act of changing the utm tags, either via query param or ga('set') also inaugurates a new session.

Anonymous
Not applicable

Re: Google Analytics, Marketo, Landing Pages... and Regular Expressions?

I would also recommend installing the Data Integrity Bundle from the Analytics Gallery here: Google Analytics Solutions Gallery

This will give you a dashboard and custom reports you can use to monitor for issues like parameters in your URLs, etc.

Ben