How To Quickly Generate Google Analytics Tracking URLs with Excel

Google Analytics is a fantastic system for tracking and analyzing your website traffic and promotional campaigns. One of the key features that we can use is the option to generate special tracking links that provide us more data for measuring traffic sources and conversions. The problem is these tracking URLs are complicated to put together and it can often be difficult to keep a record of which you have used, when and where. Wouldn't it be great if we could generate and keep a record of our tracking links in a spreadsheet? Well, now we can!

Generating Your GA Tracking Links

Google helpfully provides us a list of parameters here:


We can replicate these fields in our spreadsheet, and then we can combine the values we enter in the correct format to create our tracking URL.


So first we have the target website address that we want the visitor to go to, then the Campaign Source, which is essentially where the visitor will be coming from. Next we have the medium, so in my case it will be an advert, an email or a social media click such as a status update. You can have a campaign term, for example if you bidding or optimizing for keywords, Content in case you are split testing or using different creative choices, and a name for your Campaign such as "My Awesome New Years Promotion" and so on.

The User Defined Function

Excel has various string manipulation features we could use in a formula, but to keep the spreadsheet clean and easy to maintain we can create a UDF instead and call it thus:


Our UDF is extremely simple. It takes the parameters and checks to see which have been used before concatenating a result string and returning it.


By using Excel, not only can we generate large numbers of these tracking links, we can also keep a record of the links and apply other data, perhaps starting with a date stamp, the conversions and click-throughs, and so on.

Perhaps you could connect this spreadsheet to source data from your content or campaign management system?

Please let us know if you use something like this and how it works out for you...

About the Author: Yoav Ezer

Yoav co-authors the technology and productivity blog Codswallop. He is also the CEO of a company that produces PDF to XLS conversion software. For more Excel tips, join him on Facebook or Twitter

Codswallop blog

Additional Posts

Glee Social Cool Kid

So You Wanna Be A Social Cool Kid? Superficial Teen Morals as a Way To Build Your Network

RSS - syndicate your blog content to social media sites

RSS – The Secret Weapon of Your Small Business Blog

Google Testing Segmenting PPC Markets: Session Based Broad Match

In compliance with Ontario’s non-essential business closure our physical offices are closed until further notice. Fortunately our willingness to adopt work from home and the required technology over the past two years has allowed us to continue our operations without impact. For our valued clients and partners you can expect the same great level of service and execution you have become accustomed to.

Many clients/prospects have reached out to us in an effort to introduce new campaigns as quickly as possible. In an effort to help our clients pivot we have increased our campaign build capacity. We are now able to turn new campaigns over in 2-3 business days opposed to the typical 5-7 business day turnaround time. Please note that campaign launch approvals from the vendor side (Google, Bing, Facebook, Instagram etc.) may be delayed as those companies migrate to work from home.

For existing clients please reach out to your account manager with any questions you may have.

For non-clients looking for assistance with new campaigns please Contact Us

Read previous post:
Glee Social Cool Kid
So You Wanna Be A Social Cool Kid? Superficial Teen Morals as a Way To Build Your Network

Social media is fun, and it's an opportunity to really give your brand a story. But if you're having a...