Upcoming LunaMetrics Seminars
Pittsburgh, Jan 12-16 Boston, Jan 12-16 New York City, Jan 26-30 Denver, Feb 9-13

Bulk Campaign URL Builder for Google Analytics Campaign Parameters


This tool can tag a bulk list of URLs with Google Analytics campaign parameters. Just enter in your campaign parameters, paste in your links (carriage or comma separated, both work), and press ‘Submit’.



Submit

What are campaign parameters?

Campaign parameters are query parameters that Google Analytics uses to figure out where a user was referred from. Campaign parameters overrule any other referral information that Google Analytics might see; for example, if you share a link on Facebook tagged ‘http://www.mysite.com/?utm_source=facebook’, users who click that link will be attributed to Facebook in your reports, but if one of those visitors visits and tweets the same link, the visitors they refer from Twitter will be credited as visits from Facebook. Our best practice recommendation is to add campaign parameters to any link you share to your domain.z

utm_source is the source of the visitor, e.g. ‘newsletter’ or ‘twitter’, and is required for Google Analytics to recognize and process the parameters

utm_medium is the medium that users traveled through to reach your site, e.g. ‘email’ or ‘referral’

utm_campaign is the marketing campaign the link is associated with, e.g. ‘example-banner-ads’ or ‘NYC-Training’

utm_term is the keyword attached to the visit, e.g. ‘google analytics training’ or ‘(not provided)’ (I couldn’t resist)

utm_content is a field to define more about the specific link, like it’s location or other relevant information not covered by the other parameters, e.g. ‘sidebar’

How does it work?

The tool is a simple JavaScript application that operates entirely within your browser; no server-side stuff necessary. When you paste the URLs into the box, it grabs them and appends the campaign parameters you specify, correctly formatted. Since a utm_source value is necessary, it will display an error if it doesn’t detect that a source has been entered. The tool also encodes special characters.

Which links should I tag with campaign parameters?

Seriously, any links that you share on Facebook, Twitter, Google+, in email campaigns, and so on, should have campaign parameters. It’s the only way to reliably get valid visitor referral information into Google Analytics; emailed links and app-based browsing tend to screw this up. Campaign tagging ensures you’re getting some information about all of the visitors that the link refers.

Have questions about campaign parameters? Sound off in the comments.

http://www.lunametrics.com/blog/2013/10/31/bulk-url-builder-campaign-parameters/

7 Responses to “Bulk Campaign URL Builder for Google Analytics Campaign Parameters”

Lauren says:

Love it but it doesn’t work for me in Chrome Version 30.0.1599.101 or Safari Version 6.0.3 (8536.28.10) on a Mac OSX 10.8.3. No form submission on click.

Hey Lauren,

Copy+paste error on my part :) fixed!

Dan

Ken Williams says:

If the URL’s already contain query parameters, this creates out two question marks. Need to add some logic to switch the starting ? into an &.

Colleen says:

Not entirely sure if it makes sense to bulk create tags. It’s so important to distinguish your content and key terms.

Hey Ken,

I hadn’t thought of that! I’ll tweak it to check for those first.

Dan

Hey Colleen,

I’m going to have to disagree – I can think of quite a few scenarios that it makes sense to make bulk tags. For example, a newsletter; all the links point to the same domain, and visits are already segmented by the page they land on.

Even if you are going to create separate content tags, you can simply generate your URLs without the content tag appended (by leaving it blank or adding a space) and then fill them in individually afterwards. It at least saves the trouble of having to fill in the other parameters!

Dan

Ken – added! Thanks for the excellent feedback.

Dan