We recently began working with a client who uses profuse amounts of AdWords tracking templates (previously no clients had even known what a tracking template was). Due to this client’s huge volume, our tracking setup had to be lean and mean. You might be wondering what tracking templates do or why you’d want to use them. Let’s talk about it.
Let’s say we’re a company with 5 or more AdWords campaigns, each with it’s own 5 to 10 ad groups (maybe more). Like many businesses we want to track clicks and conversions by ad group & campaign in our own database/3rd party platform, as well as in Google Analytics. How do we manage all that? We could create 25 to 100 unique Final URLs, one for each ad group & campaign combination, or we could use tracking templates and custom parameters to do the same work in one tenth of the time.
As you can see in the screenshot above, tracking templates can be applied in the campaign level settings, but a template can also be added at the account level, ad group level, and even at the ad & keyword level. So what does a tracking template do? It allows you to append things to the final url. As you might have seen in the screenshot, a typical tracking template could look like one of these:
- {lpurl}?campaign=test+campaign&adgroup=test+adgroup
- http://www.tracking.com/?url={lpurl}&id=5
The {lpurl} stands for “Landing Page URL” and dynamically inserts your final url into the template. The rest of the template is yours to customize with static or dynamic attributes. We recommend using the first of the two templates listed above unless you have a 3rd party tracking site that redirects back to your final url or {lpurl}. The next step is to decide which dynamic values you want to pass along with custom parameters. If you need campaign names dynamically passed into the template, for example, add them like this:
Notice each custom parameter is forced to have an underscore before it. In the example above we added a custom parameter to our campaign and set {_campaign} equal to “Test+Campaign+Name” (the + characters are used to represent spaces in url parameters). Now, anywhere that we put {_campaign} in the tracking template, it puts the value “Test+Campaign+Name” into the final url.
If you’re still confused about this, I’ll give another (hopefully) helpful example. Let’s say you set your account tracking template to {lpurl}?utm_campaign={_campaign} and create 2 campaigns named “Test Campaign 1” and “Test Campaign 2”. Next you set Test Campaign 1’s custom parameters to {_campaign} = Test+Campaign+1 and Test Campaign 2’s customer parameters to {_campaign} = Test+Campaign+2. Once this is set up, any ad click inside of Test Campaign 1 will have utm_campaign=Test+Campaign+1 appended in the url parameters and clicks in Test Campaign 2 will have utm_campaign=Test+Campaign+2 appended.
Back to our previous situation of tagging each ad group & campaign combination. Once you have your template built out, lets say it’s {lpurl}?utm_campaign={_campaign}&utm_adgroup={_adgroup}, you put it inside each campaign’s settings or in the account settings (account url options are in the shared library – see screenshot below).
With the tracking template set, all that’s left is to go into each campaign’s settings and set {_campaign} equal to the campaign’s name (remember to use + instead of spaces). Next, do the same for each ad group [Note: to view ad group tracking templates and custom parameters go to the campaign view and make sure the ad groups tab is selected. Click the Columns drop down and select Attributes, then add Tracking template & Custom parameter to the columns. See screenshot below].
Once each ad group has an {_adgroup} parameter set equal to the ad group name, your tracking template is good to go! The Campaign names & Ad Group names will be pulled into the final url dynamically for your 3rd party system or database to read and analyze. Note that you can do the same thing for keywords and more (you can even pull in keywords without using custom parameters by typing a special parameter in your tracking template). I’ll save that for another blog post, stay tuned!