Expand my Community achievements bar.

SOLVED

campaign cid

Avatar

Level 4

I have a sample url with cid . The cid is configured in Adobe Launch.

https://www.xyz.com/contact-us?cid=2022-spring|speed-flexibility|end2end|california|usa|google|ads|bluebutton 2|bluebutton|test

 

I have created below for the agency to populate the data. How do, I classify the above data and report it in Adobe Analysis Workspace. Do I have to use a classification importer to import the data when they fill out below? Is there other ways to do it?

 

Destination URLutm_campaign
(utm_campaignchild)
Specialty
(utm_specialty)
Campaign Region
(utm_campaignregion)
Campaign Country
(utm_campaigncountry)
Publisher
(utm_source)
(picklist)
Medium
(utm_medium)
(picklist)
Asset Title
(utm_content)
(utm_campaignassettype)Term
(conditional - Paid Search only)
Output: Tracked URL
https://www.xyz.com/contact-us2022-springspeed-flexibilityend2endcaliforniausagoogleadsbluebutton 2bluebuttontesthttps://www.xyz.com/contact-us?cid=2022-spring|speed-flexibility|end2end|california|usa|google|ads|bluebutton 2|bluebutton|test
1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

Hi, 

 

You can actually use the Classification Rule Builder and Regex Rules to parse this data out.

 

So first, for this to work, you really need to be sure that the format is always as shown... that each piece of data you need to extract is always sitting in the same "location".... as in, IF someone doesn't pass a value for utm_campaignchild, that there is an "empty" value between the pipes (i.e. ?cid=2022-spring||end2end|california|usa|google|ads|bluebutton 2|bluebutton|test) so that the next value, the utm_specialty doesn't get pulled into the wrong classification.

 

I am going to assume you already know how to set up your classifications, and will focus entirely on the Rule Builder for this answer, but if you need help on the other part, please let me know).

 

In Rule Builder, you will need to create a new Rule Set, then you can open it for editing. You will first need to select the suite (or suites) that you want the rules to apply to, then you can start adding rules (in this case, using Regex).

 

You will be presented with a simple "one example" checker in which to validate your rules... Personally, I prefer to build out my regex in a third party tool that allows me to validate multiple inputs at once (but that is personal preference... I tend to use https://www.regextester.com/ or http://gskinner.com/RegExr/ - if you are testing multiple rules at once, make sure to enable the mulliline flag)

 

because the only separation is a pipe, the order and ensuring that the same number of elements is always provided in the same order is crucial to this working... 

 

JDungan_0-1654550681943.png

 

I created a very simple regex, looking for all 10 sections in your CID, when I hover over them you can see how each piece is extracted into a separate group.

 

However, IF you are missing one of the values, and actually have "2022-spring|end2end|california|usa|google|ads|bluebutton 2|bluebutton|test3" instead of "2022-spring||end2end|california|usa|google|ads|bluebutton 2|bluebutton|test3" you could experience parsing issues or data falling into the wrong classification.

 

As you play with the options you will be able to see that the values could all shift to the wrong group; or worse, because you are expecting 10 items, and there are only 9, it could fail outright...

 

Ensuring you have the || for empty values allows the groups to stay locked to the correct value:

JDungan_1-1654551038051.png

^ the utm_campaignchild is left empty, and the utm_specialty stays in the proper "group3"

 

My simple Regex is this, but you may need to adjust it to better suite real content... (also I recommend not having the spaces in your values.. but since your example had that, I put that in my temp rule)

^([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)$

 

In Rule Builder, you don't need to include the / and /g that usually wrap around regex rules... and then you can test a sample right in Adobe:

JDungan_2-1654551288653.png

 

You can see the same group info comes out....

 

Once you save the rule, you can choose the classification, and use the Group Notation to dynamically pull the value into that classification... for Instance... if I want the utm_campaignchild I would use $2 in the rule:

 

JDungan_3-1654551416158.png

 

Just make sure you choose the correct classification.

 

Your rules are processed Top Down, so make sure that if you have any sort of "conflicting rules" that the one that takes priority is closer to the bottom of the list.

 

When you have all your rules set, you can test some bulk data using the "Test Rule Set" function, where you can enter some sample data and make sure it maps as intended...

 

I don't actually have a classification built for this sample, so I can't really take a screenshot to show you. 

 

When you are happy with the results, choose a lookback window and Activate the rule.... If you need to make changes later, the rule will be auto deactivated until your changes are made, then you will need to choose your window and activate it again.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor and Adobe Champion

Hi, 

 

You can actually use the Classification Rule Builder and Regex Rules to parse this data out.

 

So first, for this to work, you really need to be sure that the format is always as shown... that each piece of data you need to extract is always sitting in the same "location".... as in, IF someone doesn't pass a value for utm_campaignchild, that there is an "empty" value between the pipes (i.e. ?cid=2022-spring||end2end|california|usa|google|ads|bluebutton 2|bluebutton|test) so that the next value, the utm_specialty doesn't get pulled into the wrong classification.

 

I am going to assume you already know how to set up your classifications, and will focus entirely on the Rule Builder for this answer, but if you need help on the other part, please let me know).

 

In Rule Builder, you will need to create a new Rule Set, then you can open it for editing. You will first need to select the suite (or suites) that you want the rules to apply to, then you can start adding rules (in this case, using Regex).

 

You will be presented with a simple "one example" checker in which to validate your rules... Personally, I prefer to build out my regex in a third party tool that allows me to validate multiple inputs at once (but that is personal preference... I tend to use https://www.regextester.com/ or http://gskinner.com/RegExr/ - if you are testing multiple rules at once, make sure to enable the mulliline flag)

 

because the only separation is a pipe, the order and ensuring that the same number of elements is always provided in the same order is crucial to this working... 

 

JDungan_0-1654550681943.png

 

I created a very simple regex, looking for all 10 sections in your CID, when I hover over them you can see how each piece is extracted into a separate group.

 

However, IF you are missing one of the values, and actually have "2022-spring|end2end|california|usa|google|ads|bluebutton 2|bluebutton|test3" instead of "2022-spring||end2end|california|usa|google|ads|bluebutton 2|bluebutton|test3" you could experience parsing issues or data falling into the wrong classification.

 

As you play with the options you will be able to see that the values could all shift to the wrong group; or worse, because you are expecting 10 items, and there are only 9, it could fail outright...

 

Ensuring you have the || for empty values allows the groups to stay locked to the correct value:

JDungan_1-1654551038051.png

^ the utm_campaignchild is left empty, and the utm_specialty stays in the proper "group3"

 

My simple Regex is this, but you may need to adjust it to better suite real content... (also I recommend not having the spaces in your values.. but since your example had that, I put that in my temp rule)

^([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)\|([-a-z0-9\s]*)$

 

In Rule Builder, you don't need to include the / and /g that usually wrap around regex rules... and then you can test a sample right in Adobe:

JDungan_2-1654551288653.png

 

You can see the same group info comes out....

 

Once you save the rule, you can choose the classification, and use the Group Notation to dynamically pull the value into that classification... for Instance... if I want the utm_campaignchild I would use $2 in the rule:

 

JDungan_3-1654551416158.png

 

Just make sure you choose the correct classification.

 

Your rules are processed Top Down, so make sure that if you have any sort of "conflicting rules" that the one that takes priority is closer to the bottom of the list.

 

When you have all your rules set, you can test some bulk data using the "Test Rule Set" function, where you can enter some sample data and make sure it maps as intended...

 

I don't actually have a classification built for this sample, so I can't really take a screenshot to show you. 

 

When you are happy with the results, choose a lookback window and Activate the rule.... If you need to make changes later, the rule will be auto deactivated until your changes are made, then you will need to choose your window and activate it again.

Avatar

Community Advisor and Adobe Champion

You can of course continue to use Imported Classifications, looking for specific combinations of data... but if your campaign tracking is properly consistent with placement and number of items, this will be dynamic.