Editor’s Note: This article is targeted at readers experienced in using Google Analytics. If you’re new to Analytics, the following guide might be challenging.
Many websites use internal advertising in the form of banners or personalized product recommendations to bring additional products and services to the attention of visitors and to increase conversions and leads.
Naturally, the performance and effectiveness of internal marketing campaigns should be assessed, too, as this is one of the most powerful instruments for generating more leads, more conversions and more revenue on your website. In many cases, web analysts use Google Analytics’ UTM campaign parametersto track internal advertising.
For those of you who are not familiar with UTM parameters, this is what an internal link could look like if you add UTM parameters:
www.yourdomain.tld/superproduct.htm?utm_source=internal&utm_medium=internal-ads&utm_campaign=cross-selling
The problem: UTM parameters are intended to be used in external campaigns (for example, promoted posts on Facebook). Unfortunately, they are not suitable for tracking internal campaigns. In this article, I’ll explain why you would corrupt your Google Analytics data when using UTM parameters for internal tracking purposes.
The solution: I have developed a set of URL parameters (called ITM parameters) that make tracking internal marketing just as simple and convenient as the familiar UTM parameters. Set-up takes a little time, but then you’d have a means of tracking internal marketing that both is easy to use and delivers accurate data. This article presents the solution and includes a precise description of all the necessary steps.
Did you know that CSS can be used for collecting statistics? Indeed, there’s even a CSS-only approach for tracking UI interactions using Google Analytics. Read more →
Well, yes and no. There’s no technical problem with using UTM parameters for internal links as well. However, in the context of web analytics, it is definitely not advisable! As soon as a visitor clicks on an internal link with UTM parameters, their current session in Google Analytics is ended and a new session is started with the source
and medium
information from the UTM parameters. This has disagreeable consequences for your data in Google Analytics:
source
and medium
information from the UTM parameters, which makes it more difficult to quantify the contribution of various external traffic sources to your conversions.Naturally, you want to avoid these negative consequences, because they reduce the quality of your website’s analytics.
Nevertheless, the use of UTM parameters to track banners ads and product recommendations is widespread. For one thing, many web analysts are unaware of the problem described above. But the deciding factor is something else: The UTM parameters are easy to use, very flexible and accessible, even for the less technically adept among us, which is why they are so often misused for internal campaigns.
In my blog post “Tracking Teasers and Internal Links in Google Analytics” (in German only, unfortunately), I’ve already covered how clicks on internal banner ads can be monitored and evaluated using event tracking or enhanced e-commerce tracking.
In practice, I’ve discovered that setting up tracking is too much for many people and/or they don’t follow through with it systematically. As a result, they fall back on using the UTM parameters for internal purposes.
So, I asked myself the following question: If the UTM parameters are so popular, can I find a way to track and evaluate internal marketing campaigns using URL parameters?
The answer is yes, it is possible!
Not with UTM parameters, because the type of evaluation you can do with these is predetermined in Google Analytics. What we can do, however, is define a new set of URL parameters that we then use to track internal marketing campaigns.
I call these parameters simply ITM parameters. Instead of using utm_source
, utm_medium
and so on, you would now use the parameters itm_source
, itm_medium
and so on for tracking your internal advertising. I consciously took the names of the UTM parameters, so that existing URLs can be easily modified with “find and replace.”
OK, let’s get started. I’ll show you how to use Google Tag Manager and Google Analytics to create a set of URL parameters for tracking internal marketing campaigns and for analyses.
Drawing on the UTM parameters, we’ll use the following ITM parameters to track internal marketing campaigns:
itm_source
itm_medium
itm_campaign
itm_content
text_link
or banner_468x60
.itm_term
A URL that uses all five ITM parameters might look something like this:
http://www.mydomain.tld/superproduct.htm?itm_source=mydomain.tld&itm_medium=banner_ad&itm_campaign=sale-2017&itm_content=banner_468x60&itm_term=special_offers
Now we have to make sure that the information we are collecting with the ITM parameters is passed to Google Analytics and available for analysis.
Note: To analyze ITM parameters in Google Analytics, we need to create customs reports. In this article, I’ll show you how to create these reports, but I’ve uploaded them to Google Analytics’ Solutions Gallery, too! You’re free to download the reports here and here.
All of the information that we collect with the ITM parameters should be saved in Google Analytics. To this end, we’ll create custom dimensions in Google Analytics. Here, we have to consider their scope: Should we create the new dimensions at the session or hit level?
Let’s go back to the UTM parameters for a moment. The UTM parameters are session-level parameters — that is, the information regarding source, medium, campaign and so on applies to the entire session. What this means for internal campaign tracking is that only the information regarding the last link clicked is captured with UTM parameters.
However, if we want to measure the influence of internal ads on conversion rates, then we would be interested in all of the clicks on internal banners, not just the last one. For this reason, it is advisable to create the new dimensions in Google Analytics at the hit level (for example, pageviews) in order to record the individual clicks on banner ads accurately.
The catch is that session-based and hit-based dimensions can only be combined in custom reports in exceptional cases. That means that we can’t combine conversions (session level) with individual clicks on banners (hit level), and it means that an internal promotion report, like the one we know from enhanced ecommerce, is not available as a custom report.
So, how do we solve this problem?
It’s up to you which method to use. If you capture the information from the ITM parameters on a session basis, it will be easier to manage the reports in Google Analytics, but the data will be less precise. If you go with the second variant, you will capture very accurate click data for internal banners but will have to invest more time to link this data to your conversions.
Alternatively, you could employ both methods in parallel by creating two custom dimensions for each ITM parameter in Google Analytics: one at the session level, the other at the hit level. Then, you will be free to decide how you want to analyze the data. The disadvantage of this solution is that you need 10 custom dimensions in Analytics to implement it, rather than 5. This might be a critical point, since the free version of Analytics allows a maximum of 20 custom dimensions.
In the following step, we’ll create two sets of dimension: one at the hit level and one at the session level. If you’ve already decided whether to count clicks on internal ads in sessions only or as hits only, then you’ll only need to create the one set that you require.
Click on “Admin” in Google Analytics. Select “Custom Dimensions” under “Custom Definitions” in the “Property” area.
Now click on “+ New Custom Dimension”:
itm_source_h
. The _h
at the end of the name indicates the scope “Hit.”Repeat these steps for the dimensions itm_medium_h
, itm_campaign_h
, itm_content_h
and itm_term_h
.
When you’re done, you should have five new dimensions at the hit level in Google Analytics:
Repeat the steps again for the second set of dimensions (at the session level):
itm_source_s
. The _s
at the end of the name indicates the scope “Session.”Repeat these steps for the dimensions itm_medium_s
, itm_campaign_s
, itm_content_s
and itm_term_s
.
Now, you should have five new dimensions at the session level as well:
When you add the ITM parameters to your URLs, these enhanced URLs will also be displayed in Google Analytics (for example, in the content reports). In this case, you would see the same page twice: once with the additional ITM parameters and once without. We want to prevent this, because the content of the pages with and without ITM parameters would be identical. Thankfully, Google Analytics provides a simple means of excluding query parameters.
First, select your “Property” in the “Admin” view, and then the desired “data view.” Under the “View Settings” menu item, you’ll find the section “Exclude URL Query Parameters”:
Enter the ITM parameters that are to be used for tracking in the field provided: itm_source
, itm_medium
, itm_campaign
, itm_content
, itm_term
.
Then, just save the changes, and we’re done here.
Remember that the Google Bot will also find your URLs with the ITM parameters. This could mean that these URLs will also land in Google’s index and cause duplicate content. We can prevent duplicates from arising with a minor tweak in Google Search Console. Select “URL Parameters” from the “Crawl” section in Search Console:
Now click on the “Add Parameter” button to let Google know that the ITM parameter doesn’t affect the page’s content:
itm_source
in the “Parameter” field.Repeat these steps for the parameters itm_medium
, itm_campaign
, itm_content
and itm_term
as well. When you’re finished, all of the ITM parameters should be configured as follows:
Now that we have laid the groundwork, we finally come to the point that probably interests you the most: How will the ITM parameters be read with Google Tag Manager and be passed to the custom dimensions in Google Analytics?
This is surprisingly easy. All we need to do is store the content of the ITM parameters in user-defined variables and then send them to Google Analytics with the pageview
tag. That’s it!
Let’s begin
For each of the five ITM parameters, we’re going to create a variable in Tag Manager. When a URL that contains one of these parameters is called, its value will be saved in the corresponding variable.
Click on “Variables” in the “Workspace” in Tag Manager and then on “New” under “User-Defined Variables”.
In the window that opens, we’ll define the first variable, itm_source URL-Parameter
, where we’ll be storing the value from the URL parameter itm_source
.
itm_source URL-Parameter
.itm_source
. This is the name of the URL parameter that is going to be saved in this variable.Repeat these steps for the four other parameters (itm_medium
, itm_campaign
, itm_content
and itm_term
).
Once you’re finished, there will be five variables available in Tag Manager to save the values from the ITM parameters.
In this screenshot, you can see not only the five newly created variables (itm_xxx URL-Parameter
), but also five additional variables with the type “Constant” (itm_xxx Index
). Let’s take a closer look at the variable itm_source Index
:
The variable itm_source Index
is a constant and has the value 14
.
What is it good for?
In the next step, we’re going to send the contents of the five itm_xxx URL-Parameter
variables to the custom dimensions we prepared in Google Analytics. Each of these custom dimensions is addressed using an index number. In the example, the index number for the dimension itm_source
is 14
(see the section “Creating Dimensions for the ITM Parameters”). In your case, the number will probably be different. If you use the custom dimensions in different tags, you will probably have to check the number of the relevant dimension every time in Google Analytics. That’s why I like to save the dimension number in its own variable — so that I don’t have to remember it. Saving the index numbers in separate variables is not necessary; you can also just address the dimensions in the tag directly with the respective number.
Even with the most basic configuration of Google Analytics and Tag Manager, you will have at least one tracking tag activated — namely, the tag used to send the pageviews to Google Analytics. This tag is ideally suited to be enhanced for the ITM parameters.
Click on “Tags” in the “Workspace” in Tag Manager, and then select the tag with the trigger “All Pages”:
Clicking on the name of the tag will display its details:
Make sure that the “Track Type” is set to “Pageview.” This is the tag used to send pageviews to Google Analytics.
Open the configuration page for the tag, and add the ITM parameters:
{{itm_source Index}}
in the “Index” field and the variable {{itm_source URL-Parameter}}
in the “Dimension Value” field. In this way, the content of the URL parameter itm_source
— which we saved before in the variable itm_source URL-Parameter
— will be passed to dimension number 14 in Analytics.15
). Add the four remaining dimensions for the variables itm_medium-URL Parameter
, itm_campaign URL-Parameter
,itm_content URL-Parameter
and itm_term-URL Parameter
.Here, at the latest, you’ll have to decide whether the information from the ITM parameters should be saved at the session or hit level in Google Analytics. In the example above, I used the index numbers of the session-based dimensions. You will have to adjust this according to your needs.
Now that we have enhanced the pageviews tag, don’t forget to publish the changes in Tag Manager. Now, when the requested URL contains additional ITM parameters, Tag Manager will read them and pass the information to Google Analytics.
After you have finished setting up ITM parameter tracking in Tag Manager, it’s time to take a closer look at the analysis options in Google Analytics. In doing so, we will have to decide whether to save the ITM parameters at the session or hit level (see the section “Creating Custom Dimensions in Google Analytics”).
If you save the ITM parameters in custom dimensions with the scope “Session,” then evaluation of the internal marketing campaign will work in much the same way as with UTM parameters. As I’ve already mentioned, the disadvantage of this method is that there is only one set of ITM data for the whole session, which is overwritten each time a URL with ITM parameters is clicked. As a result, you will only see the information relating to the last click on an internal banner. Of course, this was already the case when using UTM parameters.
Session-based tracking of ITM parameters is more convenient in terms of web analytics, but less accurate than capturing the ITM parameters at the hit level.
The simplest way to create a custom report for evaluating internal marketing campaigns is via the standard reports for campaigns. In Google Analytics, select the report via “Acquisition” → “Campaigns” → “All Campaigns.” You can then modify this report to suit your evaluation requirements by clicking on the “Customize” button.
I’ve made the report for session-based evaluation of internal marketing available in the Google Analytics Solutions Gallery.
This is what it looks like:
itm_campaign_s
→ itm_content_s
→ itm_term_s
. So, the internal marketing campaign level is immediately visible in this report. The two other dimensions, itm_source_s
and itm_medium_s
, can be added easily as required.dimension itm_campaign_s
is not empty.Let’s look at the second tab in the report:
itm_source_s
, itm_medium_s
, itm_campaign_s
, itm_content_s
and itm_term_s
.Important tip: The table only displays sessions that have values in all five(!) ITM dimensions. If, for example, you don’t use the parameter itm_term
, then the dimension itm_term_s
will remain empty, which means that no sessions would be displayed in the table. We can eliminate this restriction in two ways: either by removing the unused dimensions from the report or by using Google Tag Manager to set a default value in the dimension if the corresponding ITM parameter is empty. The second option necessitates more work in Tag Manager, as we would then have to distinguish between mandatory parameters and optional parameters.
With the aid of some simple example data, I’d like to illustrate how the data from internal marketing campaigns is presented in this report.
In the “Explorer” tab, it is possible to combine various dimensions with one another; for example, itm_campaign_s
(marketing campaign) and itm_content_s
(ad content):
Or you can analyze the effectiveness of internal marketing campaigns in relation to the external traffic sources. This, for instance, is not possible with UTM parameters:
The table contained in the report provides you with a session-based view of all the ITM parameters and makes it simple to export data for further processing in Excel, Google Docs, etc.
Hit-based evaluation of internal marketing campaigns provides you with an accurate overview of how often specific advertising content has been clicked. However, an additional step is necessary in order to establish the relationship to the conversions achieved. This makes this method of analysis more time-consuming than session-based evaluation. However, it enables more sophisticated analyses.
There is no standard report for hit-based evaluation that we can take and customize for our purposes, so we’ll have to create our own report that will provide us with information on how often the individual pieces of ad content have been clicked. Based on this report, we will then infer the data segments that we need for our analysis. But first, the report.
I’ve also made this report available in the Google Analytics Solutions Gallery.
This is what it looks like:
itm_source_h
→ item_medium_h
→ itm_campaign_h
→ itm_content_h
→ itm_term_h
.dimension itm_source_h
is not empty.Let’s look at the second tab in the report:
itm_source_h
, itm_medium_h
, itm_campaign_h
, itm_content_h
and itm_term_h
.Important tip: This table also only displays hits that have values in all five(!) ITM dimensions. If, for example, you don’t use the parameter itm_term
, then the dimension itm_term_h
would remain empty, which means that no hits would be displayed in the table. In this case, you would either have to remove the unused dimensions from the table or use default values for the parameters (see above).
As I already mentioned, combining hit-based data (such as clicks on internal ads) and session-based data (such as conversions) directly is not possible in Google Analytics. That’s why we first use the custom report “Internal Marketing Campaigns (hit-based)” to identify data segments that we can then apply to the acquisition reports, for example.
Let’s look at the report, jumping straight to the table this time:
In the table, we see the number of clicks (hits) on internal ads. The data is grouped based on the combinations of ITM parameters that occurred. In a sense, this is our raw data. Now we have to consider which data segments we can identify:
itm_term_h
, which identifies ad content with a relationship to web analytics (webanalyse
) or AdWords (adwords
).Even with so little data, we can continue to slice it up into new segments. For example, you could create segments from the dimensions itm_term_h
and itm_content_h
to examine which type of ad content works better for itm_term_h = "webanalyse"
or itm_term_h = "adwords"
. But that’s just a side note.
I’m not going to go into the details of creating the data segments. You can see the definition of the segments in their names.
We’ll start with the segment itm_campaign_h = marketing2017
. To make the difference clearer, I also defined a segment that includes all of the users who didn’t click on internal ads. This segment is named itm_campaign_h != marketing2017
. !=
is the operator for “not equal to.”
In the second short analysis, we’ll consider the segments itm_term_h = webanalyse
and itm_term_h = adwords
. These segments enable us to differentiate based on the context of the internal ad with regard to content — in this example, therefore, AdWords (adwords
) and Web Analytics (webanalyse
).
adwords
) and Web Analytics (webanalyse
). Once again, I’ve activated the segment itm_campaign_h != marketing2017
(users without clicks on internal ads) as a control group.itm_term_h = webanalyse
and itm_term_h = adwords
would be six conversions, but it is actually seven conversions. This is a consequence of hit-based evaluation. It is possible that users click on banner ads for AdWords and banner ads for Web Analytics during a single session. These users would, then, be part of both data segments!Naturally, these examples are just a taste of the many analyses that are possible with data segments. But they clearly show how much more the potential for analysis is when clicks on internal ads are captured at the hit level.
All done! This article ended up being much longer than I originally planned.
Thanks for sticking with me right to the end and for taking on the challenges of tracking and analyzing internal marketing campaigns with me. As you’ve seen, there are a number of decisions to be made and various settings to be configured.
But they’re worth the effort — internal advertising is one of the most powerful instruments for generating more leads, more conversions and more revenueon your website. In order to employ this instrument profitably, you’ll need data that allows for the evaluation and optimization of your internal marketing campaigns. Particularly if you’re offering personalized product recommendations and the like, detailed data is indispensable for identifying jumping-off points for optimizations.
All the best in the analysis of your internal marketing campaigns!
This article was originally published at Smashingmagazine.com, by author Christian Ebernickel.
Recent Comments