Update time: August 17, 2023
Some people use UTM to track traffic sources, but in adobe analytics there is no UTM-like dimension by default, only one campaign code(cid). However,UTM-like effects can be achieved with some settings.
Let’s take a look at how to set it up:
Convert UTM to cid structure
Copy the code below to CONFIGURE TRACKER USING CUSTOM CODE in the Adobe Analytics Extension, the purpose of this code this code is to convert UTM to cid structure:
var page=document.location.href; if(page.match("utm_medium")){ var queryString = page.split('?')[1]; var utm=decodeURI(queryString); var v=""; for (var i=0;i<utm.split("&").length;i++) { v+=utm.split("&")[i].split("=")[1]+"|"; } s.campaign=v.substring(0,v.length-1) }
Such as https://www.bbccss.com/?utm_source=test1&utm_medium=test2&utm_campaign=test3,
Finally, s_compaign=test1|test2|test3
Conversion Classifications
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.
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: