So, UTMs work really well for tracking external campaigns in Google Analytics. I use UTMs all the time for the sites that I work with. But I'm wondering how to properly track these campaigns easily if I migrate the target site into its parent site.

I've read through a few different recommendations. Justin Cutroni says create a new Google Analytics view and use site search. This sounds easy, but also seems pretty darn hacky. Site search wasn't meant for that (and site search has a few limitations that aren't present when tracking external campaigns in GA).

Escape Studio says site search is one of 3 ways to do this. The others: Enhanced ecommerce, Event tracking, and Custom dimensions. Event tracking, it appears, is the most common solution for this problem, but it involves touching code any time a new campaign is created.

Is it possible to simply create a new internal campaign just by adding a querystring to a URL, and then somehow telling GA that the querystring is an internal campaign? And then how to properly monitor these internal campaigns in GA... without touching code.

  • 1
    What is an "internal campaign"? UTM fields exist to track sources and ads/links that are outside your site. If it's in your site there's many other ways to track it. Events, enhanced link attribution, custom segments... – Osvaldo Mar 21 '16 at 21:44
  • @Osvaldo an Internal campaign can be ads served that point back to specific pages within the domain. Or it can be a specific type of link from a UI element to a landing page within the domain. Really, any link back into the domain but which initiates a new user experience. – samthebrand Mar 21 '16 at 23:06

If you really can not (do not want) to touch the source code, you can use Google Analytics Advanced Filter. It requires basic knowledge of POSIX regular expressions, but using it you can "extract" part of URL (like "campaign=summer2013" -> but you should match only the "summer2013") and then insert it into other field, in this case maybe Event Label.

See https://support.google.com/analytics/answer/1034836?hl=en&ref_topic=1034830 for more information about Advanced filters.

| improve this answer | |

Google Analytics doesn't support internal campaigns in a similar fashion as external campaigns are supported. If you use campaign variables internally on your site, you'll overwrite external campaign / referral info.

Your best bet is to use a custom session-level variable to identify the internal campaign. GA documentation is here:


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.