Derived fields are an important aspect of the real-time reporting functionality in Adobe Customer Journey Analytics. A derived field allows you to define (often complex) data manipulations on the fly, through a customizable rule builder. You can then use that derived field as a component (metric or dimension) in Workspace or even further define the derived field as a component in Data view.
Derived fields can save a significant amount of time and effort, compared to transforming or manipulating your data in other locations outside of Customer Journey Analytics. Such as Data Prep, Data Distiller, or within your own Extract Transform Load (ETL) / Extract Load Transform (ELT) processes.
Derived fields are defined within Data views, are based on a set of functions defined as rules, and applied to available standard and/or schema fields.
Example use cases are:
Define a derived Page Name field that corrects improper collected page name values to correct page name values.
Define a derived Marketing Channel field that determines the proper marketing channel based on one or more conditions (for example URL parameter, page URL, page name).
When you create or edit a derived field, you use the derived field interface.
Name | Description | |
---|---|---|
1 | Selector | You use the selector area to select and drag and drop your function, function template, schema field, or standard field on to the rule builder. Use the drop-down to select between: Functions - lists available functions, Function templates - lists available function templates, Schema fields - lists fields available from dataset categories (event, profile, lookup) and previously defined derived fields, and Standard fields - standard available fields (like Platform Dataset ID). Only string and numeric standard fields are displayed in the selector. If the function supports other data types, standard fields with these other data types can be selected for values or fields within the rule interface. You can search for function, function templates, schema, and standard fields using the Search box. You can filter the selected object list by selecting Filter and specify filters in the Filter fields by dialog. You can easily remove filters using for each filter. |
2 | Rule builder | You build your derived field sequentially using one or more rules. A rule is a specific implementation of a function and is therefore always associated with only one function. You create a rule by dragging and dropping a function into the rule builder. The function type determines the interface of the rule. See the Rule interface for more information. You can insert a function at the start, end, or in between rules already available in the rule builder. The last rule in the rule builder determines the final output of the derived field. |
3 | Field Settings | You can name and describe your derived field and inspect its field type. |
4 | Final Output | This area shows an on-the-fly updated preview of output values, based on data over the last 30 days and the changes you make to the derived field in the rule builder. |
When you access the derived field interface for the first time, the Start with a field template wizard is shown.
Your derived field dialog is populated with rules (and functions) required or useful for the type of field that you selected. See Function templates for more information on the available templates.
When you define a rule in the rule builder, you use the rule interface.
Name | Description | |
---|---|---|
A | Rule Name | By default the rule name is Rule X (X referring to a sequence number). To edit the name of a rule, select its name and type in the new name, for example Query Parameter . |
B | Function Name | The selected function name for the rule, for example URL PARSE. When the function is the last in the sequence of functions and determines the final output values, the function name is followed by - FINAL OUTPUT, for example URL PARSE - FINAL OUTPUT. To show a popup with more information on the function, select . |
C | Rule Description | You can optionally add a description to a rule. Select , then select Add Description to add a description or Edit Description to edit an existing description. Use the editor to enter a description. You can use the toolbar to format the text (using style selector, bold, italic, underline, right, left, centered, color, number list, bullet list) and adding links to external information. To finish editing the description, click outside of the editor. |
D | Function Area | Defines the logic of the function. The interface depends on the type of function. The dropdown for Field or Value shows all categories of fields (rules, standard fields, fields) available, based on the type of input the function expects. Alternatively, you can drag and drop a field from the Schema and Standard fields selector on to a Field or Value. When that dragged field is originating from a Lookup dataset, a Lookup function is automatically inserted before the function you define. See Function reference on detailed information for each of the functions supported. |
Select an existing Data view or create a Data view. See Data views for more information.
Select the Components tab of the Data view.
Select Create derived field from the left rail.
To define your derived field, use the Create derived field interface. See Derived field interface.
To save your new derived field, select Save.
Your new derived field is added to the Derived fields > container, as part of Schema fields in the left rail of your Data view.
Select an existing Data view. See Data views for more information.
Select the Components tab of the Data view.
Select Schema fields tab in the Connection pane on the left.
Select Derived fields > container.
Hover over the derived field that you want to edit, and select .
To edit your derived field, use the Edit derived field interface. See Derived field interface.
Select Save to save your updated derived field.
Select Cancel to cancel any changes you made to the derived field.
Select Save As to save the derived field as a new derived field. The new derived field has the same name as the original edited derived field with (copy)
added to it.
Alternatively, if you have used a derived field as a component for dimensions or metrics in your data view:
Select the component. Note that the component might have a different name than your derived field.
In the Component panel, select the next to your derived field, underneath Schema field name.
To edit your derived field, use the Edit derived field interface. See Derived field interface.
Select Save to save your updated derived field.
Select Cancel to cancel any changes you made to the derived field.
Select Save As to save the derived field as a new derived field. The new derived field has the same name as the original edited derived field with (copy)
added to it.
Select an existing Data view. See Data views for more information.
Select the Components tab of the Data view.
Select Schema fields tab in Connection pane.
Select Derived fields > container.
Hover over the derived field that you want to delete, and select .
In the Edit derived field interface, select Delete.
A Delete component dialog asks you to confirm the deletion. Consider any external references there might exist to the derived field outside of the Data view.
Alternatively, if you have used a derived field as a component for dimensions or metrics in your data view:
Select the component. Note that the component might have a different name than your derived field.
In the Component panel, select the next to your derived field, underneath Schema field name.
In the Edit derived field interface, select Delete.
A Delete component dialog asks you to confirm the deletion. Consider any external references there might exist to the derived field outside of the Data view.
Derived fields are managed at a Connection level in Customer Journey Analytics. Any change made to a derived field in any of the Data views associated with that Connection applies across all these associated Data views.
To quickly create a derived field for specific use cases, function templates are available. These function templates can be accessed from the selector area in the derived field interface or are presented upon first use in the Start with a field template wizard.
This function template uses a collection of rules to build marketing channels.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template uses a collection of rules to identify site bounces.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template combines two values into one.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template provides a readable dataset name.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template creates a simple page name.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template classifies key times of the year.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template sets custom monthly goals.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template converts a limited list to an array.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template gets the first value in a delimited list.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template gets the last value in a delimited list.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template extracts the domain name using a regular expression.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template extracts query string values.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template transitions reporting from one field to another field.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template implements light bot identification.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template identifies last link clicked in a session.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
This function template flags common download links.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
To use the template, you have to specify the correct parameters for each function listed as part of the rules in the template. See Function reference for more information.
You must have the Select package or higher in order to use the functionality described in this section. Contact your administrator if you’re unsure which Customer Journey Analytics package you have.
For each supported function, find details below on:
specifications:
use cases, including:
constraints (if applicable).
Applies conditionals, based on defined criteria from one or more fields. These criteria are then used to define the values in a new derived field, based on the sequence of the conditions.
Input Data Type | Input | Included Operators | Limitations | Output |
---|---|---|---|---|
|
|
Strings
Numeric
Dates
|
|
New derived field |
You want to define rules to identify various marketing channels, by applying cascading logic to set a marketing channel field to the proper value:
cid
contains ps_
, the marketing channel should be identified as a Paid Search.cid
, the marketing channel should be identified as a Natural Search.cid
contains em_
, the marketing channel should be identified as an Email.cid
contains ds_
, the marketing channel should be identified as a Display Ad.cid
contains so_
, the marketing channel should be identified as a Paid Social.In case your site receives the following sample events, containing Referrer and Page URL, these events should be identified as follows:
Event | Referrer | Page URL | Marketing Channel |
---|---|---|---|
1 | https://facebook.com |
https://site.com/home |
Natural Social |
2 | https://abc.com |
https://site.com/?cid=ds_12345678 |
Display |
3 | https://site.com/?cid=em_12345678 |
||
4 | https://google.com |
https://site.com/?cid=ps_abc098765 |
Paid Search |
5 | https://google.com |
https://site.com/?cid=em_765544332 |
|
6 | https://google.com |
Natural Search |
Referrer | Page URL |
---|---|
https://facebook.com |
https://site.com/home |
https://abc.com |
https://site.com/?cid=ds_12345678 |
https://site.com/?cid=em_12345678 |
|
https://google.com |
https://site.com/?cid=ps_abc098765 |
https://google.com |
https://site.com/?cid=em_765544332 |
https://google.com |
You define a Marketing Channel
derived field. You use the CASE WHEN functions to define rules that create values for the based on existing values for both the Page URL
and Referring URL
field.
Note the usage of the function URL PARSE to define rules to fetch the values for Page Url
and Referring Url
before the CASE WHEN rules are applied.
Marketing Channel |
---|
Natural Social |
Display |
Paid Search |
Natural Search |
You have collected several different variations of search within your Product Finding Methods dimension. To understand the overall performance of search vs. browse, you must spend a great deal of time combining the results manually.
Your site collects the following values for your Product Finding Methods dimension. In the end, all of these values indicate a search.
Collected value | Actual value |
---|---|
search p13n_no | search |
search p13n_yes | search |
search refine p13n_no | search |
search refine p13n_yes | search |
search redirect p13n_yes | search |
search-redirect | search |
Product Finding Methods |
---|
search p13_no |
search p13_yes |
browse |
search refine p13_no |
search refine p13_yes |
browse |
search redirect p13_yes |
search-redirect |
browse |
You define a Product Finding Methods (new)
derived field. You create the following CASE WHEN rules in rule builder. These rules apply logic to all possible variations of the old Product Finding Methods field values for search
and browse
using the Contains the phrase criterion.
Product Finding Methods (new) |
---|
search |
search |
browse |
search |
search |
browse |
search |
search |
browse |
As a travel company, you would like to bucket trip duration for booked trips so you can report on bucketed lengths of trips.
Assumptions:
Your desired report should look like:
Trip Duration Type | Bookings |
---|---|
medium trip | 358 |
short trip | 347 |
long trip | 241 |
Trip Duration |
---|
1 |
12 |
3 |
6 |
4 |
8 |
6 |
2 |
1 |
2 |
21 |
8 |
You define a Trip Duration (bucketed)
derived field. You create the following CASE WHEN rule in rule builder. This rule applies logic to bucket the old Trip Duration field values into three values: short trip
, medium trip
, and long trip
.
Trip Duration (bucketed) |
---|
short trip |
long trip |
short trip |
medium trip |
medium trip |
long trip |
medium trip |
short trip |
short trip |
short trip |
long trip |
long trip |
Customer Journey Analytics uses a nested container structure, modeled after Adobe Experience Platform’s XDM (Experience Data Model). See Containers and Filter containers for more background information. This container model, albeit flexible by nature, imposes some constraints when using the rule builder.
Customer Journey Analytics uses the following default container model:
The following constraints apply and are enforced when selecting and setting values.
Constraints | |
---|---|
A | Values you select within the same If, Else If construct (using And or Or) in a rule must originate from the same container and can be of any type (string , numeric , and so forth). |
B | All the values you set across a rule must be from the same container and have the same type or a derived value of the same type. |
C | The values you select across If, Else If constructs in the rule do not have to originate from the same container and do not have to be of the same type. |
Defines a set of values that are replaced by corresponding values in a new derived field.
Input Data Type | Input | Included Operators | Limitations | Output |
---|---|---|---|---|
|
|
N/A |
|
New derived field |
You do have a CSV-file that includes a key column for hotelID
and one or more additional columns associated with the hotelID
: city
, rooms
, hotel name
.
You are collecting Hotel ID in a dimension but would like to create a Hotel Name dimension derived from the hotelID
in the CSV file.
CSV-file structure and content
hotelID | city | rooms | hotel name |
---|---|---|---|
SLC123 | Salt Lake City | 40 | SLC Downtown |
LAX342 | Los Angeles | 60 | LA Airport |
SFO456 | San Francisco | 75 | Market Street |
AMS789 | Amsterdam | 50 | Okura |
Current Report
Hotel ID | Product Views |
---|---|
SLC123 | 200 |
LX342 | 198 |
SFO456 | 190 |
AMS789 | 150 |
Desired Report
Hotel Name | Product Views |
---|---|
SLC Downtown | 200 |
LA Airport | 198 |
Market Street | 190 |
Hotel ID |
---|
SLC123 |
LAX342 |
SFO456 |
AMS789 |
You define a Hotel Name
derived field. You use the CLASSIFY function to define a rule where you can classify values of the Hotel ID field and replace with new values.
If you want to include original values that you have not defined as part of the values to classify (for example Hotel ID AMS789), ensure you select Show original values. This ensures AMS789 is part of the output for the derived field, despite that value not being classified.
Hotel Name |
---|
SLC Downtown |
LA Airport |
Market Street |
You have collected URLs instead of the friendly page name for several pages. This mixed collection of values breaks the reporting.
Page Name |
---|
Home Page |
Flight Search |
http://www.adobetravel.ca/Hotel-Search |
https://www.adobetravel.com/Package-Search |
Deals & Offers |
http://www.adobetravel.ca/user/reviews |
https://www.adobetravel.com.br/Generate-Quote/preview |
You define a Page Name (updated)
derived field. You use the CLASSIFY function to define a rule where you can classify values of your existing Page Name field and replace with updated correct values.
Page Name (updated) |
---|
Home Page |
Flight Search |
Hotel Search |
Package Search |
Deals & Offers |
Reviews |
Generate Quote |
The following additional functionality is available in the Classify rule interface:
Combines field values into a single new derived field with defined delimiters.
Input Data Type | Input | Included Operators | Limitations | Output |
---|---|---|---|---|
|
|
N/A |
2 functions per derived field |
New derived field |
You currently collect origin and destination airport codes as separate fields. You would like to take the two fields and combine them into a single dimension separated by a hyphen (-). So you can analyze the combination of origin and destination to identify top routes booked.
Assumptions:
Imagine the following bookings occur:
The desired report should look like:
Origin / Destination | Bookings |
---|---|
SLC-MCO | 2 |
SLC-LAX | 1 |
SLC-SEA | 1 |
SLC-SJO | 1 |
Origin | Destination |
---|---|
SLC | MCO |
SLC | LAX |
SLC | SEA |
SLC | SJO |
SLC | MCO |
You define an Origin - Destination
derived field. You use the CONCATENATE function to define a rule to concatenate the Original and Destination fields using the -
Delimiter.
Origin - Destination (derived field) |
---|
SLC-MCO |
SLC-LAX |
SLC-SEA |
SLC-SJO |
SLC-MCO |
Prevents counting a value multiple times.
Input Data Type | Input | Included Operators | Limitations | Output |
---|---|---|---|---|
|
|
N/A |
5 functions per derived field |
New derived field |
You want to prevent counting duplicate revenue when a user reloads the booking confirmation page. You use the booking confirmation ID at the identifier to not count the revenue again, when received on the same event.
Booking Confirmation ID | Revenue |
---|---|
ABC123456789 | 359 |
ABC123456789 | 359 |
ABC123456789 | 359 |
You define a Booking Confirmation
derived field. You use the DEDUPLICATE function to define a rule to deduplicate the Value Booking for Scope Person using Deduplication ID Booking Confirmation ID. You select Keep first instance as Value to keep.
Booking Confirmation ID | Revenue |
---|---|
ABC123456789 | 359 |
ABC123456789 | 0 |
ABC123456789 | 0 |
You use events as a proxy for campaign click-throughs with external marketing campaigns. Reloads & redirects are causing the event metric to be inflated. You would like to deduplicate the tracking code dimension so only the first is collected and minimize the event overcounting.
Visitor ID | Marketing Channel | Events |
---|---|---|
ABC123 | paid search | 1 |
ABC123 | paid search | 1 |
ABC123 | paid search | 1 |
DEF123 | 1 | |
DEF123 | 1 | |
JKL123 | natural search | 1 |
JKL123 | natural search | 1 |
You define a new Tracking Code (deduplicated)
derived field. You use the DEDUPLICATE function to define a rule to deduplicate the Tracking Code with a Deduplication scope of Session and Keep first instance as the Value to keep.
Visitor ID | Marketing Channel | Events |
---|---|---|
ABC123 | paid search | 1 |
DEF123 | 1 | |
JKL123 | natural search | 1 |
Finds all values in a selected field and replaces those values with a different value in a new derived field.
Input Data Type | Input | Included Operators | Limitations | Output |
---|---|---|---|---|
|
|
Strings
|
5 functions per derived field |
New derived field |
You have received some malformed values for your external marketing channels report, for example email%20 marketing
instead of email marketing
. These malformed values fracture your reporting and make it more difficult to see how email is performing. You want to replace email%20marketing
with email marketing
.
Original Report
External Marketing Channels | Sessions |
---|---|
email marketing | 500 |
email %20marketing | 24 |
Preferred Report
External Marketing Channels | Sessions |
---|---|
email marketing | 524 |
External Marketing |
---|
email marketing |
email%20marketing |
email marketing |
email marketing |
email%20marketing |
You define an Email Marketing (updated)
derived field. You use the FIND AND REPLACE function to define a rule to find and replace all occurrences of email%20marketing
with email marketing
.
External Marketing (updated) |
---|
email marketing |
email marketing |
email marketing |
email marketing |
email marketing |
Lookup values using a field from a lookup dataset and returns a value in a new derived field or for further rule processing.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
N/A |
3 functions per derived field |
New derived field or value for further processing in next rule |
You would like to lookup the activity name using the activity id collected when your customers clicked on a personalized banner shown through Adobe Target. You want to use a lookup dataset with Analytics for Target (A4T) activities containing activity ids and activity names.
Activity Id | Activity Name |
---|---|
415851 | MVT Test Category Pages |
415852 | Luma - Campaign Max 2022 |
402922 | Home Page Banners |
You define an Activity Name
derived field. You use the LOOKUP function to define a rule to lookup the value from your collected data, specified in the Field to apply lookup field (for example ActivityIdentifier). You select the lookup dataset from the Lookup dataset list (for example New CJA4T Activities). Then you selecting the identifier field (for example ActivityIdentifier) from the Matching key list and the field to return from the Values to return list (for example ActivityName).
The Lookup function is applied at report time to the data retrieved by Customer Journey Analytics from the lookup dataset you have configured as part of your connection.
You can quickly insert a Lookup function in the rule builder, already containing one or more other functions.
Converts values from a field to lowercase and stores it into a new derived field.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
N/A |
2 functions per derived field |
New derived field |
You would like to convert all collected product names into lowercase for proper reporting.
Collected Product Names | Product Views |
---|---|
Tennis racket | 35 |
Tennis Racket | 33 |
tennis racket | 21 |
Baseball bat | 15 |
Baseball Bat | 12 |
baseball bat | 10 |
You define a Product Names
derived field. You use the LOWERCASE function to define a rule to convert the value from the Collected Product Names field to lowercase and store that in the new derived field.
Product Names | Product Views |
---|---|
tennis racket | 89 |
baseball bat | 37 |
Use basic mathematical operators (add, subtract, multiply, divide & raise to a power) on numeric fields.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
|
|
New derived field |
Due to inflation you want to correct the revenue numbers of ingested CRM data with 5% inflation.
CRM ID | Annual Revenue |
---|---|
1234 | 35,070,000 |
4133 | 7,500,000 |
8110 | 10,980 |
2201 | 42,620 |
You define a Corrected Annual Revenue
derived field. You use the MATH function to define a rule that multiplies the original Annual Revenue number with 1.05.
CRM ID | Corrected Annual Revenue |
---|---|
1234 | 36,823,500 |
4133 | 7,875,000 |
8110 | 11,529,00 |
2201 | 44,751 |
To create a formula:
Simply start typing in the Formula field and numeric fields that match what you type will appear in a popup menu. Alternatively, you can drag and drop a numeric field from the available fields in the left pane.
Add the operand (for example *
to multiply) followed by another field or a static value. You can use parenthesis to define more complex formulas.
To insert a static value (for example 1.05
), type the value and select Add x as a static value or Add -x as a negative static value from the popup menu.
A green checkmark indicates whether your math formula is valid, otherwise you will see a warning and the message Invalid formula expression.
There are some important considerations when working with static numbers in the MATH function:
Static values need to be associated with a field. For example, using the MATH function with only static fields is not supported.
You cannot use the raise to power operator (ˆ
) on a static value.
If you are using multiple static values in a formula, these static values should be grouped using parenthesis for the formula to be valid. For example:
This formula returns an error.
This formula is valid.
Use the Math function for hit-level based calculations. Use the Summarize function for event, session or person scope based calculations.
Merges values from two different fields into a new derived field.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
N/A |
5 functions per derived field |
New derived field |
You would like to create a dimension made up from the page name field and the call reason field with the intent of analyzing the journey across channels.
Page Name | Session | Visitors |
---|---|---|
help page | 250 | 200 |
home page | 500 | 250 |
product detail page | 300 | 200 |
Call Reason | Session | Visitors |
---|---|---|
questions about my order | 275 | 250 |
make a change to my order | 150 | 145 |
problem with ordering | 100 | 95 |
You define a Cross Channel Interactions
derived field. You use the MERGE FIELDS function to define a rule to merge the values from the Page Name field and Call Reason field and store that in the new derived field.
Cross Channel Interactions | Sessions | Visitors |
---|---|---|
home page | 500 | 250 |
product detail page | 300 | 200 |
questions about my order | 275 | 250 |
help page | 250 | 200 |
make a change to my order | 150 | 145 |
problem with ordering | 100 | 95 |
You must select the same type of fields within a Merge Fields rule. For example, if you select a Date field, all other fields you want to merge have to be Date fields.
Takes a field as input and resolves the next or previous value for that field within the scope of the session or use. This will only apply to the Visit and Event table fields.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
N/A |
3 functions per derived field |
New derived field |
You would like to understand what the next or previous value is of the data that you receive, taken into account repeat values.
Example 1 - Handling include repeats
Data received | Next value Session Index = 1 Include Repeats |
Next value Session Index = 1 NOT Include Repeats |
Previous value Session Index = 1 Include Repeats |
Previous value Session Index = 1 NOT Include Repeats |
---|---|---|---|---|
home | home | search | No value | No value |
home | search | search | home | No value |
search | search | product detail | home | home |
search | product detail | product detail | search | home |
product detail | search | search | search | search |
search | product details | product detail | product detail | product detail |
product detail | search | search | search | search |
search | search | No value | product detail | product detail |
search | No value | No value | search | product detail |
Example 2 - Handling include repeats with blank values in data received
Data received | Next value Session Index = 1 Include Repeats |
Next value Session Index = 1 NOT Include Repeats |
Previous value Session Index = 1 Include Repeats |
Previous value Session Index = 1 NOT Include Repeats |
---|---|---|---|---|
home | home | search | No value | No value |
home | home | search | home | No value |
home | search | search | home | No value |
search | search | product detail | home | home |
search | search | product detail | search | home |
search | product detail | product detail | search | home |
product detail | No value | No value | search | search |
You define a Next Value
or Previous value
derived field. You use the NEXT OR PREVIOUS function to define a rule that selects the Data received field, select Next value or Previous value as Method, Session as Scope and set the value of Index to 1
.
You can only select fields that belong to the Visit or Event table.
Include repeats determines how to handle repeating values for the NEXT OR PREVIOUS function.
Include repeats looks and the next or previous values. If Include Repeats is selected, it will ignore any sequential repeats of next or previous values from the current hit.
Rows with no (blank) values for a selected field will not have next or previous values returned as part of the NEXT OR PREVIOUS function output.
Replaces a value from a field using a regular expression into a new derived field.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
N/A |
1 function per derived field |
New derived field |
You would like to grab a potion of a URL and use that as a unique page identifier to analyze traffic. You use [^/]+(?=/$|$)
for the regular expression to capture the end of the URL and $1
as the output pattern.
Page URL |
---|
https://business.adobe.com/products/analytics/adobe-analytics-benefits.html |
https://business.adobe.com/products/analytics/adobe-analytics.html |
https://business.adobe.com/products/experience-platform/customer-journey-analytics.html |
https://business.adobe.com/products/experience-platform/adobe-experience-platform.html |
You create a Page Identifier
derived field. You use the REGEX REPLACE function to define a rule to replace value of the Referring URL field using a Regex of [^/]+(?=/$|$)
and Output format of $1
.
Page Identifier |
---|
adobe-analytics-benefits.html |
adobe-analytics.html |
customer-journey-analytics.html |
adobe-experience-platform.html |
Customer Journey Analytics uses a subset of the Perl regex syntax. The following expressions are supported:
Expression | Description |
---|---|
a |
A single character a . |
a|b |
A single character a or b . |
[abc] |
A single character a , b , or c . |
[^abc] |
Any single character except a , b , or c . |
[a-z] |
Any single character in the range of a -z . |
[a-zA-Z0-9] |
Any single character in the range of a -z , A -Z , or digits 0 -9 . |
^ |
Matches the beginning of the line. |
$ |
Matches the end of the line. |
\A |
Start of string. |
\z |
End of string. |
. |
Matches any character. |
\s |
Any whitespace character. |
\S |
Any non-whitespace character. |
\d |
Any digit. |
\D |
Any non-digit. |
\w |
Any letter, number, or underscore. |
\W |
Any non-word character. |
\b |
Any word boundary. |
\B |
Any character that is not a word boundary. |
\< |
Start of word. |
\> |
End of word. |
(...) |
Capture everything enclosed. |
(?:...) |
Non-marking capture. Prevents the match from being referenced in the output string. |
a? |
Zero or one of a . |
a* |
Zero or more of a . |
a+ |
One ore more of a . |
a{3} |
Exactly 3 of a . |
a{3,} |
3 or more of a . |
a{3,6} |
Between 3 and 6 of a . |
You can use these sequences in the Output format any number of times and in any order to achieve the desired string output.
Output placeholder sequence | Description |
---|---|
$& |
Outputs what matched the whole expression. |
$n |
Outputs what matched the nth sub-expression. For example, $1 outputs the first sub-expression. |
$` |
Outputs the text between the end of the last match found (or the start of the text if no previous match was found), and the start of the current match. |
$+ |
Outputs what matched the last marked sub-expression in the regular expression. |
$$ |
Outputs the string character "$" . |
Splits a value from a field into a new derived field.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
N/A |
5 functions per derived field |
New derived field |
You collect voice app responses into a delimited list in a single dimension. You would like each value in the list to be a unique value in the responses report.
Voice App Responses | Events |
---|---|
it was great,made perfect sense,will recommend to others | 1 |
it was great,somewhat confusing,will recommend to others | 1 |
it was not great,very confusing,will not recommned to others | 1 |
You create a Responses
derived field. You use the SPLIT function to define a rule to use the Convert to array method to convert the values from the Voice App Response field using ,
as the Delimiter.
Responses | Events |
---|---|
it was great | 2 |
will recommend to others | 2 |
it was not great | 1 |
made perfect sense | 1 |
somewhat confusing | 1 |
very confusing | 1 |
will not recommend to others | 1 |
You collect voice app responses into a delimited list in a single dimension. You would like the responses from the first value in the list into its own dimension. You would like to put the last value in the list into its own dimension.
Responses | Events |
---|---|
it was great,made perfect sense,will recommed to others | 1 |
it was great,somewhat confusing,will recommend to others | 1 |
it was not great,very confusing,will not recommned to others | 1 |
You create a First Response
derived field. You use the SPLIT function to define a rule to take the first value from the Responses field from the left of the response ,
as the delimiter.
You create a Second Response
derived field to take the last value from the Responses field by selecting From the right, 1 as the Delimiter and 1 as the Index.
First Response | Events |
---|---|
it was great | 2 |
it was not great | 1 |
Second Response | Events |
---|---|
will recommend to others | 2 |
will not recommend to others | 1 |
Applies aggregation-type functions to metrics or dimensions at event, session, and user levels.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
|
3 function per derived field | New derived field |
You would like to categorize Add to Cart Revenue into three different categories: Small, Medium, and Large. This allows you to analyze and identify the characteristics of high-value customers.
Assumptions:
Scenarios:
Logic:
Results:
You create an Add To Cart Revenue Size
derived field. You use the SUMMARIZE function and the Sum Summarize method with Scope set to Person to sum the values of the cart_add field. Then you use a second CASE WHEN rule to split the result in the tree category sizes.
Add To Cart Revenue Size | Visitors |
---|---|
Small | 1 |
Medium | 1 |
Large | 1 |
Use the Summarize function for event, session or person scope based calculations. Use the Math function for hit-level based calculations.
Trims whitespace, special characters, or number of characters from either the beginning or the end of field values into a new derived field.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
N/A |
1 function per derived field |
New derived field |
You collect product data, however that data contains hidden whitespace characters which fragment reporting. You would like to easily trim any excess whitespace
Product ID | Events |
---|---|
"prod12356 " |
1 |
"prod12356" |
1 |
" prod12356" |
1 |
You create a Product Identifier
derived field. You use the TRIM function to define a rule to Trim whitespace from the Product ID field.
Product Identifier | Events |
---|---|
"prod12356" |
3 |
Your data on page names collected includes some erroneous special characters at the end of the page name which must be removed.
Name | Events |
---|---|
home page# | 1 |
home page? | 1 |
home page% | 1 |
home page& | 1 |
home page/ | 1 |
You create a Page Name
derived field. You use the TRIM function to define a rule to Trim special characters from the Name field using the Special characters #?%&/
.
Page Name | Events |
---|---|
home page | 5 |
You collect data including a storeID. The storeID contains the abbreviated US state code as the first two characters. You want to only use that state code in your reporting.
storeID | Events |
---|---|
CA293842 | 1 |
CA423402 | 1 |
UT123418 | 1 |
UT189021 | 1 |
ID028930 | 1 |
OR234223 | 1 |
NV22342 | 1 |
You create a Store Identifier
derived field. You use the TRIM function to define a rule to Truncate from right the storeID field from String end to position 3
.
Store Identifier | Events |
---|---|
CA | 2 |
UT | 2 |
ID | 1 |
OR | 1 |
NV | 1 |
Parses out different parts of a URL including protocol, host, path, or query parameters.
Input Data Type | Input | Included Operators | Limit | Output |
---|---|---|---|---|
|
|
N/A |
5 functions per derived field |
New derived field |
You only want use the referring domain from the referring URL as part of a marketing channel’s set of rules.
Referring URL |
---|
https://www.google.com/ |
https://duckduckgo.com/ |
https://t.co/ |
https://l.facebook.com/ |
You define a Referring Domain
derived field. You use the URL PARSE function to define a rule to fetch the host from the Referring URL field and store that in the new derived field.
Referrer Domain |
---|
www.google.com |
duckduckgo.com |
t.co |
l.facebook.com |
You want to use the value of the cid
parameter of a query string in a Page URL as part of the output of a derived tracking code report.
Page URL |
---|
https://www.adobe.com/?cid=abc123 |
https://www.adobe.com/?em=email1234&cid=def123 |
https://www.adobe.com/landingpage?querystring1=test&test2=1234&cid=xyz123 |
You define a Query String CID
derived field. You use the URL PARSE function to define a rule to fetch the value of the query string parameter in the Page URL field, specifying cid
as the query parameter. The output value is stored in the new derived field.
Query String CID |
---|
abc123 |
def123 |
xyz123 |
The following limitations apply to the Derived field functionality in general:
Function | Limitations |
---|---|
Case When |
|
Classify |
|
Concatenate |
|
Deduplicate |
|
Find & Replace |
|
Lookup |
|
Lowercase |
|
Math |
|
Merge Fields |
|
Next or Previous |
|
Regex Replace |
|
Split |
|
Summarize |
|
Trim |
|
URL Parse |
|
An operator in an If or Else If construct within a Case When function is the combination of a criterion with one value. Every additional value for the criterion adds to the number of operators.
As an example, the condition below uses 13 operators.
An operator in the Classify function is a single entry for When value equal Original value Replace value with New value.
As an example, the Classify rule below uses 3 operators.
Trim
and Lowercase
are features already available in the component settings in Data views. Using Derived Fields allows you to combine these functions to do more complex data transformation directly in Customer Journey Analytics. For example, you can use Lowercase
to remove case sensitivity in an event field, and then use Lookup
to match the new lowercase field to a lookup dataset that only has lookup keys in lowercase. Or you can use Trim
to remove characters before setting up Lookup
on the new field.
Support for lookup and profile fields in Derived Fields enables you to transform data based on event lookups and profile attributes. This can be especially helpful in B2B scenarios with account-level data in lookup or profile datasets. Additionally, this support is useful to manipulate data in common fields from lookup data (like campaign info and offer type), or from profile data (like member tier and account type).
See for more background information on Derived Fields: