Implementing UTM Parameters & Campaign Classification in Adobe Analytics

Implementing UTM Parameters & Campaign Classification in Adobe Analytics

Accurate tracking of campaign performance is essential for making informed, data-driven decisions. In Adobe Analytics, UTM parameters allow you to track key campaign attributes such as source, medium, and campaign name with precision. This guide walks you through the process of setting up UTM tracking, configuring classification rules, and testing your setup to ensure smooth and accurate reporting.

1. Understanding UTM Parameters in Adobe Analytics

UTM parameters are tags added to URLs in the query string that help track the origin of traffic and measure the performance of marketing campaigns.


The most commonly used UTM parameters include:

utm_source (e.g., Google, Facebook)

utm_medium (e.g., email, CPC)

utm_campaign (e.g., summer_sale)

utm_content (e.g., banner, footer)

utm_term (e.g., keywords for PPC)

Let m

2. Setting Up Tracking Code in Adobe Analytics

To capture UTM parameters, use the following snippet code:

s.usePlugins = true; //This enables the use of custom plugins in Adobe Analytics//

s.doPlugins = function (s) { //The doPlugins function is where custom logic for processing and capturing data is defined.//

if (s.Util.getQueryParam('utm_medium')) {

s.campaign = s.Util.getQueryParam('utm_medium') + ":" +

s.Util.getQueryParam('utm_source') + ":" +

s.Util.getQueryParam('utm_campaign') + ":" +

s.Util.getQueryParam('utm_content') + ":" +

s.Util.getQueryParam('utm_term');

}

s.campaign = s.getValOnce(s.campaign, 's_campaign', 0);

};

This part checks if the utm_medium parameter exists in the URL. If it does, it concatenates the values of the UTM parameters (utm_medium, utm_source, utm_campaign, utm_content, and utm_term) into a string, using a colon (:) as a separator. This string is then stored in s.campaign.

Note: The getValOnce function ensures that the s.campaign value is stored only once per session or visit. If the same value appears again, it won’t overwrite the previous one. The third argument (0) specifies that the value should not be persisted across sessions.

This code is useful for capturing UTM parameters (commonly used in tracking marketing campaigns) from the URL and assigning them to the s.campaign variable, which can then be used for analytics purposes. The use of getValOnce ensures that the campaign data is only captured once during a single session or visit.

Setting Up Classifications in Adobe Analytics

Step 1: Define Classifications

In Adobe Analytics, go to Admin > Report Suites > Classifications. Add classifications such as Source, Medium, Campaign, Content, and Term to the Campaign variable.

Step 2: Utilize the Classification Rule Builder

The Classification Rule Builder streamlines the process of mapping UTM values. Use a regular expression (regex) pattern to break down the concatenated UTM string into separate classifications.

regex example:


Regex Pattern Breakdown:

^(.+)\:(.*)\:(.*)\:(.*)\:(.*)\:(.*)\:(.*)\:(.*)\:(.*)\:(.*)\:(.*)\:(.*)$
        

  1. ^: Anchors the match to the start of the string.
  2. (.+): Matches one or more of any character (except for newlines) and captures it into the first group.
  3. \:: Matches a literal colon (:) character.
  4. (.*): Matches zero or more characters (of any type) and captures them into the next group. This repeats 11 more times, capturing different parts of the string separated by colons.
  5. $: Anchors the match to the end of the string.

What it does:

This regex is designed to match a string that consists of multiple sections, each separated by a colon (:). Each section is captured in a separate group (up to 13 total groups).

Example Matching String:

first_part:second_part:third_part:fourth_part:fifth_part:sixth_part:seventh_part:eighth_part:ninth_part:tenth_part:eleventh_part:twelfth_part:thirteenth_part
        

google:cpc:christmas_sale

This regex splits the value into:

  • Source: google
  • Medium: cpc
  • Campaign Name: christmas_sale

If some UTM fields are missing:

eg. source::campaign::term

In this case, the second and fourth fields will be captured as empty values.

After Configuring UTM Tracking and Classifications:

  1. Test Your Implementation Once UTM tracking and classifications are set up, it’s essential to test and validate that your tracking is working correctly. Ensure that UTM parameters are being captured accurately in Adobe Analytics and that the classification rules are properly mapping the data.
  2. Monitor Data in Adobe Analytics After testing, begin monitoring the campaign data in Adobe Analytics. Check that UTM parameters, such as utm_source, utm_medium, utm_campaign, etc., are appearing in the reports as expected. Also, verify that the classifications are correctly applied to each campaign.
  3. Adjust for Missing or Incorrect Data If you notice missing or incorrect UTM data, refine your regex patterns or classification rules to ensure all necessary values are captured. It's important to handle missing data gracefully to avoid gaps in your campaign reporting.
  4. Generate Reports and Analyze Performance Once your UTM tracking is confirmed to be working, use Adobe Analytics' reporting tools to segment your traffic based on the UTM parameters. This will allow you to analyze campaign performance, identify which sources and mediums are driving the most traffic, and understand how different campaigns contribute to your overall goals.
  5. Optimize Campaigns Based on Insights With accurate UTM data in place, you can now optimize your marketing efforts. Use the insights gathered from campaign performance to refine your strategies, allocate resources more effectively, and enhance the overall return on investment (ROI) for future campaigns.


Sapna yadav

UI/Web Developer| Improving Web Vitals | Responsive Design | Media Queries | Bootstrap | Google PageSpeed Insight | Emailers | jQuery| Git | Adobe Target | DTM | Adobe Launch

3 周

Informative ??

Arun Chinega

Leader in Digital Transformation, Marketing Analytics, Marketing Sciences, Omnichannel Commerce

1 个月

Nice tip

要查看或添加评论,请登录

Sunit Sharma的更多文章

社区洞察

其他会员也浏览了