Table of Contents
Many people use UTM to track traffic sources, but in adobe there is no UTM-like dimension by default, only one campaign.However,UTM-like effects can be achieved with some settings. Let’s take a look at how to set it up:
Step1、Write UTM information to a cookie
Copy the code below to CONFIGURE TRACKER USING CUSTOM CODE in the Adobe Analytics Extension, the purpose of this code is to write UTM information to the cookie.
/* Plugin Config */
var utm_param = null;
source = encodeURIComponent(s.Util.getQueryParam("utm_source"));
medium = encodeURIComponent(s.Util.getQueryParam("utm_medium"));
campaign = encodeURIComponent(s.Util.getQueryParam("utm_campaign"));
content = encodeURIComponent(s.Util.getQueryParam("utm_content"));
term = encodeURIComponent(s.Util.getQueryParam("utm_term"));
utm_param = [source,medium,campaign,term,content].join('|');
var date= new Date();
date.setMonth(date.getMonth() + 6);
var success = s.Util.cookieWrite(cookieName, cookieValue, date);
Let’s do a test and see the UTM information written in the cookie or not, First release the launch configuration, then access the link with the UTM parameters, such as https://www.bbccss.com/?utm_source=test1&utm_medium=test2&utm_campaign=test3，Finally, look at the s_compaign inside the cookie whether there are parameters for storing UTM.
As you can see, the UTM parameter information was successfully written to the cookie.
%7C indicates that the URL is transcoded，test1|test2|test3|| After transcoding, it is test1%7Ctest2%7Ctest3%7C%7C
Find the Conversion Classifications of your report suite, and then add the UTM parameters. The function of this is to split the Campaign into multiple fields for storage, and the corresponding field is UTM.
step3、Classification Rule Builder
Create a Rule Builder and configure matching rules：
Select which report suites and variables you will use for this rule set：
Add a rule and match a condition to a classification, then specify the action to take. You can use regular expressions to match consistently formatted string values with a classification.
Create a Rule and select the Regular Expression ^(.*)\|(.*)\|(.*)\|(.*)\|(.*)$：
Create 5 rules, and finally configure it as:
The next step is test rule set：
Copy test1|test2|test3|| to Sample Keys and click run test：
You can see that the UTM parameters are split into the corresponding fields, indicates that the set classification is valid, return to rule set，Check Rule overwrite any existing values：
This is the rule for applying backtracking data to the past.
Finally click on activate.The Rule Set is now active and will process within the next 24 hours. The data can be seen in the Campaign report, as shown below, the corresponding UTM dimensions are here: