Attracting the right visitors to your website and encouraging them to accomplish a desired outcome can often feel like laying out a trail of breadcrumbs for them to follow.
The trail may start from a post on Facebook, a Google search ad, or an email newsletter, from which the person arrives to your website. You may then lay out some hero images, featured posts, or sidebar links to lead them deeper into your site. And finally, you may encourage the visitor to submit a form, download a brochure, or make a purchase.
When it comes to analyzing this customer journey and optimizing your marketing activities, you’ll want to ensure that you can track every step; every breadcrumb in the trail. In fact you’ll want to track every trail, as there are likely many paths each visitor could follow to the same destination.
If you have Google Analytics, you are likely familiar with using “utm” parameters to track inbound campaigns and Goals to track key outcomes. But what do you use to track the path of visitors through your site on the way to completing those outcomes?
You may know that 5% of visitors from LinkedIn downloaded your whitepaper, but how many of them got there by clicking the hero image vs. the link in the sidebar?
Using our own website as an example, you can see that we promote our Google Analytics and Google Tag Manager courses in the home page banner, in the Events widget, and in the sidebar of inner pages.
When someone signs up for a course, we would like to know which promos they viewed and which one they clicked to get to the course page. Luckily, Google Analytics has an Internal Promotions feature designed specifically for this purpose—tracking the effectiveness of on-site promotional elements in leading visitors to complete desired outcomes.
The rest of this post is a how-to guide on setting up internal promotion tracking in GA through Google Tag Manager. With a little bit of effort, you too can measure the effectiveness of your on-site promotions!
Prior to the introduction of Internal Promotion tracking in GA, tracking on-site campaigns was often done in one of the following ways:
- Leveraging the Site Search reports. For example, see this post by Justin Cutroni.
- Tracking events for clicks on promotional links.
- Adding custom query parameters to promotional links.
Although these methods provide information on how frequently your internal promotions are being clicked, it is challenging to see how each promotion is contributing to a certain goal conversion.
Internal Promotion tracking is part of Enhanced Ecommerce features in Universal Analytics. But it’s certainly not just for ecommerce sites! You can enable Enhanced Ecommerce and use the Internal Promotion reports even if you are not tracking ecommerce transactions in GA.
How to Implement Internal Promotion Tracking
1. Enable Enhanced Ecommerce in Google Analytics
Remember, you do not need to sell anything online in order to enable this. If you are using Ecommerce tracking in GA already, but not Enhanced E-commerce, you should be able enable Enhanced Ecommerce without any impact on your tracking, but we recommend first testing in a separate view.
- In your GA admin panel, select the desired view and click on Ecommerce Settings
- Switch on Enable Ecommerce (if not already enabled)
- Switch on Enhanced Enhanced Ecommerce Reporting
With respect to internal promotion tracking, enabling Enhanced Ecommerce gives you access to four built-in dimensions to capture information about your promotions:
- Name: e.g. Summer Sale
- ID: e.g. PROMO_1234
- Position: e.g. banner_slot_1
- Creative: e.g. summer_banner_2
(Note that either Name or ID field is required with other fields being optional)
Enhanced Ecommerce also provides a pre-built Internal Promotions report. Once enabled, you will find it under the Conversions section in GA.
Once you start collecting data on impressions and clicks of your internal promotions, your report will look something like this:
GA automatically calculates a click-through rate (CTR) for each promotion and shows you conversions that occurred as a result. Just like other standard GA reports, you can switch the primary dimension, add a secondary dimension, and view different conversion metrics.
Now that we have an idea of what this should look like once we are done, let’s send information about our promotions to GA.
2. Tag Internal Promotion Links
To identify and label our internal promotions, you can use custom URL query parameters. This is often the easiest way of adding information into promotional links that are managed through a CMS. It also provides an efficient transition in the case you are already tracking internal promotions through URL parameters (e.g. using site search).
We will use four URL query parameters:
(Note: If you already have your own custom parameters in your promo links, you can use those instead.)
These parameters should be added to all promotional links that we wish to track. Note that only one of promo_name or promo_id is required; the other parameters are optional.
For example, if we have a promotion for a “Spring Sale” located in our top banner, the link may look like this:
<a href="http://www.mydomain.com/spring_promo?promo_name=Spring_Sale&promo_id=1604001&promo_creative=v1&promo_position=Top_Banner">Spring Sale</a>
Note that there are other methods for making promotion information available (e.g. HTML attributes, data layer). As long as the information is available on the page, you can configure GTM to capture it and send it to GA with your promotion impressions and clicks.
3. Configure Tracking in Google Tag Manager
Once all of that is done, we will configure GTM to pick up this information and send it to GA. We need to set up a total of 4 variables, 5 triggers and 3 tags for this.
First, we need to create our variables:
- Create “Promo Name” variable:
- Next we will create 3 variables that have similar configuration with the only difference in “Query Key” parameter:
- Promo ID with Query Key set to promo_id
- Promo Creative with Query Key set to promo_creative
- Promo Position with Query Key set to promo_position
Next, create our triggers:
- “DOM Ready” Trigger. (Check first to see if you already have a DOM Ready trigger configured):
- “Click – Promo Click – ID found”:
- “Click – Promo Click – Name found”:
- “Internal Promotions View” trigger:
- “Internal Promotion Click” trigger:
Finally we will set up our tags:
- Custom HTML tag to track promotion views. This tag should fire on the “DOM Ready” trigger and it will contain the following code:
- Custom HTML tag that will track promotion clicks. This tag should fire on the “Click – Promo Click – ID found” and “Click – Promo Click – Name found” triggers and it will contain the following code:
- Finally, we will set up a separate GA Tag to track promotion impressions and clicks. It will have the following configuration and will load on both Internal Promotions triggers we created:
Test, publish and you are done!
Let us know if you have any questions, comments, or suggestions about tracking internal promotions in Google Analytics