Mobile app version of vmapp.org
Login or Join
Jennifer507

: How to track Campaigns in Google Analytics without using UTM parameters? Showing UTMs when linking from one site you own to another is kind of like wearing open-toed shoes at work: it's unseemly

@Jennifer507

Posted in: #GoogleAnalytics #Tracking #Traffic

Showing UTMs when linking from one site you own to another is kind of like wearing open-toed shoes at work: it's unseemly and unprofessional.

But it's effective. Traffic spills nicely into Google Analytics with each parameter (source, medium, campaign, content) easily sortable & filterable in a single view.

I assume there is another way to do this: to somehow obfuscate the campaign parameters so that Google Analytics reads, ie:
foo.com/fudge?=xyz
as
foo.com/fudge?utm_source=sitex.com&utm_medium=social&utm_campaign=social-explosion
Can this be done in the GA admin panel? Is there another way?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Jennifer507

2 Comments

Sorted by latest first Latest Oldest Best

 

@Becky754

@Stephen Ostermiller 's answer is correct. If I could suggest something that might make things a little easier. Using Google Tag Manager you can automate the process and it will also give you more flexibility. Check out this article on UTM Campaign Parameters from LunaMetrics. This will save you a lot of time.

10% popularity Vote Up Vote Down


 

@BetL925

It can't be done in the Google Analytics admin panel, but it can be done programmatically by your server.

You can put some extra JavaScript in your snippet to send Analytics the full campaign info based on your shortened form. Here is how it might look if you use PHP with Universal analytics:

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
<?php if($_SERVER['QUERY_STRING'] == "=xyz"){ ?>
ga('set',{
campaignName:'social-explosion',
campaignSource:'sitex.com',
campaignMedium:'social',
campaignKeyword:'blue widgets',
campaignContent:'320x480 ad'
});
<?php } ?>
ga('create'...
ga('send', 'pageview'...


Documentation:


set method
campaignName field
campaignSource field
campaignMedium field
campaignKeyword field
campaignContent field

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme