{"id":1379,"date":"2009-12-16T10:38:00","date_gmt":"2009-12-16T10:38:00","guid":{"rendered":"https:\/\/staging.elixirrdigital.com\/us\/2009\/12\/16\/unleash-the-power-of-google-analytics-4-tracking-external-sources-tagging-urls\/"},"modified":"2025-03-05T14:52:27","modified_gmt":"2025-03-05T14:52:27","slug":"unleash-the-power-of-google-analytics-4-tracking-external-sources-tagging-urls","status":"publish","type":"post","link":"https:\/\/staging.elixirrdigital.com\/us\/2009\/12\/16\/unleash-the-power-of-google-analytics-4-tracking-external-sources-tagging-urls\/","title":{"rendered":"Unleash the Power of Google Analytics (4): Tracking External Sources &#038; Tagging URLS"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/2025\/03\/blog_analytics_4.jpeg\" alt=\"Analytics series: Tracking external sources and tagging URLS\" width=\"463\" height=\"198\"><\/p>\n<p>Google Analytics makes our lives very easy when it comes to dividing our traffic sources into easily manageable chunks. It automatically splits out non-paid search traffic and paid traffic from Adwords. It also tells us about keywords from all the search engines, plus referrals and direct traffic.<\/p>\n<p>But what happens if you send out an email with links to your site, or run a PPC (pay per click) campaign on Yahoo or Bing? I\u2019ll tell you what: it makes a big mess of all your data.<\/p>\n<p>If you send an email, Analytics will track any clicks either a referral (from web-based clients like Hotmail) or as direct traffic (from Outlook or another offline email client). Your data will be totally skewed.<\/p>\n<p>It gets worse. If you decide to run a PPC campaign anywhere other than on Google, Analytics will record the traffic as natural visits, and not paid visits. This is a real pain, and it ruins your data for natural traffic.<\/p>\n<h3>So what\u2019s the solution?<\/h3>\n<p>As you know by now, the people at Google are very kind to us. They have provided us with a tool that can generate a tag to stick on the end of any URLs or links we might need to track. If you\u2019re going to track lots of additional marketing activity, Google\u2019s URL builder will become a very dear friend.<\/p>\n<p>This is what it looks like.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/2025\/03\/url_builder.jpeg\" alt=\"Google URL Builder\" width=\"460\" height=\"358\"><\/p>\n<p>And you can find it here: <a href=\"https:\/\/www.google.com\/support\/analytics\/bin\/answer.py?hl=en&amp;answer=55578\" target=\"_blank\" rel=\"noopener\">https:\/\/www.google.com\/support\/analytics\/bin\/answer.py?hl=en&amp;answer=55578<\/a><\/p>\n<p>All you need to do is follow the on-page instructions, add the details of where you\u2019re sending the traffic, and then fill in (at least) the source, medium and campaign names. Then hit \u2018generate\u2019.<\/p>\n<p>Google will now give you a URL. Any traffic that visits your site via this URL will be automatically assigned to the traffic source, medium and campaign name that you\u2019ve specified.<\/p>\n<h3>Example 1 \u2013 email marketing.<\/h3>\n<p>This is the most common reason I use the URL builder tool. Whenever we send out marketing emails for our clients, we tag all of the links in the email back to the client\u2019s site. This allows us to define the email as a separate traffic source in Analytics. Like so:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/2025\/03\/source_medium_analytics.jpeg\" alt=\"Source\/ Medium in Analytics\" width=\"460\" height=\"59\"><\/p>\n<p>Using the URL builder, we put a name for the email in the \u2018Campaign Source\u2019 box. You should give your email an easily recognisable name, so when you come to report on it later, there should be no confusion. With email campaigns, it\u2019s sensible to add the send date, as above.<\/p>\n<p>The \u2018Campaign Medium\u2019 should be defined as email. The only other required box is \u2018Campaign Name\u2019. If the email you\u2019re tagging is part of a campaign, then you\u2019ll want to use that campaign name. If it\u2019s a one off, we tend to use the source name.<\/p>\n<h3>Example 2 \u2013 tracking a non-Google PPC campaign<\/h3>\n<p>Let\u2019s say you want to track a Yahoo Search Marketing (PPC) campaign in Google Analytics. If you run the campaign without tagging it, Google will automatically record the visits as coming from Yahoo, but it will wrongly assume they are organic clicks.<\/p>\n<p>To solve this problem, you need to tag your campaigns. Using the Google URL builder, you can specify the source as Yahoo and the medium as CPC (cost per click). You can then specify the campaign as \u201cYSM-PPC-campaign\u201d (or something similar). The URL builder will generate a tag that looks like this:<\/p>\n<p><i>http:\/\/www.coastdigital.com\/testpage.cfm?utm_source=yahoo&amp;utm_medium=cpc&amp;utm_campaign=YSM-PPC-campaign<\/i><\/p>\n<p>All you have to do is pop these tags on every ad URL in the campaign:<\/p>\n<p><i>?utm_source=yahoo&amp;utm_medium=cpc&amp;utm_campaign=YSM-PPC-campaign<\/i><\/p>\n<p>In this way Google won\u2019t automatically define your CPC traffic as organic.<\/p>\n<p>To gather even more detail, though, you should make use of the \u2018Term\u2019 box in the URL builder. This lets you to give every keyword its own tag, allowing you use Google Analytics to measure the success of every single one.<\/p>\n<p><b><i>Top Tip: Tagging multiple keywords (some Excel knowledge needed)<\/i><\/b><\/p>\n<p style=\"margin: 10px 0px;\"><i>Tagging every keyword in your Yahoo account might seem like a daunting task. However, using Excel, you can quickly and easily tag an account of any size. Export all of your campaigns into Excel, and sort the whole spreadsheet by component type.\u00a0It will then group all of your keywords together.\u00a0<\/i><\/p>\n<p style=\"margin: 10px 0px;\"><i>Next, use the URL Builder to create a tag that looks something like this (using this tag will work for any Google Analytics user, so feel free to copy and paste). You\u2019ll see the utm_term and utm_campaign are blank.<\/i><\/p>\n<div><b><i>?utm_source=yahoo&amp;utm_medium=cpc&amp;utm_term=&amp;utm_campaign=<\/i><\/b><\/div>\n<p style=\"margin: 10px 0px;\"><i>Scroll across the header row of your downloaded Yahoo campaigns until you find \u201cKeyword Custom URL\u201d (normally column H). Insert a few blank columns next to this row (either side is fine).<\/i><\/p>\n<p style=\"margin: 10px 0px;\"><i>In one blank column put the destination URL of the keyword. In the next column add the section of the tag that ends with utm__term=<\/i><\/p>\n<div><b><i>?utm_source=yahoo&amp;utm_medium=cpc&amp;utm_term=<\/i><\/b><\/div>\n<p style=\"margin: 10px 0px;\"><i>In the column after that, put the last part of your tag:<\/i><\/p>\n<div><b><i>&amp;utm_campaign=<\/i><\/b><\/div>\n<p style=\"margin: 10px 0px;\"><i>Drag these tag columns all the way down so that every keyword has these empty tags in the column next to them. Now go back to your &#8216;Keyword Custom URL&#8217; column and use Excel\u2019s concatenate function to tie your columns together. You should tie in your destination URL, then the first part of the tag, then the keyword, then the second part of your tag, then the campaign column. (I\u2019ve colour coded each part so you can see how the formula builds the tagged URL).<\/i><\/p>\n<p style=\"margin: 10px 0px;\"><b><i>=concatenate(<span style=\"color: red;\">destination-url<\/span>,\u00a0<span style=\"color: purple;\">first-tag<\/span>,\u00a0<span style=\"color: blue;\">keyword-column<\/span>,\u00a0second-tag,\u00a0campaign-column)<\/i><\/b><\/p>\n<p style=\"margin: 10px 0px;\"><i>This should give you a fully tagged keyword level destination URL. It will look something like this:<\/i><\/p>\n<div><b><a href=\"http:\/\/yourdomain.co.uk?utm_source=yahoo&amp;utm_medium=cpc&amp;utm_term=keyword&amp;utm_campaign=campaign\" target=\"_blank\" rel=\"noopener\"><i>http:\/\/yourdomain.co.uk<\/i><i>?<\/i><\/a><\/b><b><a href=\"http:\/\/yourdomain.co.uk?utm_source=yahoo&amp;utm_medium=cpc&amp;utm_term=keyword&amp;utm_campaign=campaign\" target=\"_blank\" rel=\"noopener\"><i>utm_source=yahoo&amp;utm_medium=cpc&amp;utm_term=<\/i><i>keyword<\/i><i>&amp;utm_campaign=campaign<\/i><\/a><\/b><\/div>\n<p style=\"margin: 10px 0px;\"><i>Drag the concatenate formula down your list of keywords and it should automatically fill in all of your destination URLs.<\/i><\/p>\n<p style=\"margin: 10px 0px;\"><i>Highlight the \u2018Keyword Custom URL\u2019 column, copy it, and then with the column still highlighted press \u2018Paste special\u2019 and choose \u2018values\u2019. This will overwrite your formula with your new, tagged URLs.\u00a0<\/i><\/p>\n<p><i>After all that, you just have to delete the columns you inserted, and upload the changes.\u00a0<\/i><\/p>\n<p><b>What else should I tag? <\/b><\/p>\n<p>Everything that isn\u2019t already sifted automatically by Google. This will help keep your Analytics accounts as tidy as possible, and allow you to access more information on the performance of your online activity, including elements such as banners, advertorial, or social media.<\/p>\n<p><a href=\"https:\/\/staging.elixirrdigital.com\/us\/blog\/feed\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/2025\/03\/blog_analytics_rss_subscribe1.jpeg\" alt=\"Subscribe to our blog and follow this Analytics series\" width=\"463\" height=\"60\" border=\"0\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Analytics makes our lives very easy when it comes to dividing our traffic sources into easily manageable chunks. It automatically splits out non-paid search traffic and paid traffic from&hellip;<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"related_service":[58],"related_industry":[],"class_list":["post-1379","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"card":"<article class=\"wp-component-card wp-component-card--dark wp-component-card--resource wp-component-card--post wp-component-card--full-width wp-component-card--no-image            wp-component-card--link js-card-link\n        \">\n        <div class=\"wp-component-card__content\">\n        <div class=\"wp-component-card__content-top\">\n                                                    <p class=\"wp-component-card__eyebrow\">\n                    Blog                <\/p>\n                        <a href='https:\/\/staging.elixirrdigital.com\/us\/2009\/12\/16\/unleash-the-power-of-google-analytics-4-tracking-external-sources-tagging-urls\/'>\n        <h2 class='wp-component-card__title'>\n            Unleash the Power of Google Analytics (4): Tracking External Sources &#038; Tagging URLS\n        <\/h2>\n    <\/a>        <\/div>\n                    <div class=\"wp-component-card__content-bottom\">\n                                    <div class=\"wp-component-card__description wysiwyg\">\n                        Google Analytics makes our lives very easy when it comes to dividing our traffic sources into easily manageable chunks. It automatically splits out non-paid search traffic and paid traffic from&hellip;                    <\/div>\n                                                                    <div class=\"wp-component-card__meta\">\n                                                    <p class=\"wp-component-card__date\">\n                                16 December 2009                            <\/p>\n                                                                            <div class=\"wp-component-card__terms\">\n                                                                                            <div class=\"wp-component-tags__tag\">\n                Analytics            <\/div>\n                                                                                                            <\/div>\n                                            <\/div>\n                                            <\/div>\n            <\/div>\n<\/article>\n","_links":{"self":[{"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/posts\/1379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/comments?post=1379"}],"version-history":[{"count":0,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/posts\/1379\/revisions"}],"wp:attachment":[{"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/media?parent=1379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/categories?post=1379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/tags?post=1379"},{"taxonomy":"related_service","embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/related_service?post=1379"},{"taxonomy":"related_industry","embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/related_industry?post=1379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}