aalan

Classify Tracking Code using Rule Builder

Well explained on Guide to Using UTM Parameters in Adobe Analytics

I used following code to capture Tracking code:

s.usePlugins=true;
s.doPlugins=function(s) {

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);

}

Then I set up the calssification in Analytics

Below is the screen shot:

Then under classification rule builder I did following setup using regx ^(.+)\:(.+)\:(.+)\:(.+)\:(.+)$

Sample value:

search:google:christmas:article:gifts

The above regex will not accept value if any one of the field is missing like search:google:christmas::gifts or :google:christmas::gifts

To fix this we have to use : ^(.*)\:(.*)\:(.*)\:(.*)\:(.*)$

For reference check Adobe Doc

For example the value is our:DC_DAGA_November_2020::adobemailing:marketin:0 then you can use the following as well:

^([^:]):([^:]):([^:]):([^:]):([^:]):([^:])$

For testing, you can use https://rubular.com/

Related Posts

Leave a comment

You must login to add a new comment.

[wpqa_login]