Adding an extraction rule to a custom field
An extraction rule determines which session, page, object, content, or header data that the custom field extracts.
Adding an extraction rule to a custom field involves the following procedures:
- Setting traffic selection rules to specify how and where the system identifies traffic for a custom field
- Setting the data source from which to extract data
- Setting transformations according to which the system changes or modifies data captured for a given custom field
Users with Operator or Administrator roles can configure custom fields with content extractions, but a user with the Security role must review and approve the configuration before either role can activate the extractions. After you have configured the content extraction, the system displays a message stating that the new custom field is waiting for security approval.
To set traffic selection for a custom field
- In a Real User Analyzer, point to the Administration > Data flow settings, and then click Custom fields.
- Expand the custom field to which you want to add an extraction rule.
- On the Action menu for this custom field, click Add new rule.
- In the Format list, select one of the following traffic selection options:
- Domain only — Scope the traffic down to a specific domain.
- Filter expression only — Scope the traffic down to a specific filter.
- Domain and filter expression — Use domain and filter to scope the traffic down.
- Default (catch-all) — Do not use a domain or filter and apply your extraction rule to all traffic.
If you select domain or filter, you can use a preconfigured domain or filter, or create a new one.
- In the Extraction name box, enter a name for your extraction.
If you selected Default in the previous step, the name will be set to Default automatically. - Click Next.
Proceed with setting the data source for a custom field.
To set the data source for a custom field
- Ensure that you have set the traffic selection.
- If necessary, point to the Administration > Data flow settings, and then click Custom fields. Then expand the custom field which extraction rule you want to edit, and click Edit rule.
- In the Source field list, select a source type.
- Certain source types require more configuration than others. For more information about configuring these source types, see the Data source configuration optionstable.
- If you want to set transformations for the custom field, click Next; otherwise, click Save.
If you clicked Next, the system adds the data source for the custom field. Proceed to setting transformations for the custom field.
Data source configuration options
Field type | Configurable options |
---|---|
Fixed String | In the String box, type the string that you want to extract. |
Geolocation Information | In the Geolocation list, select the geolocation field that you want to extract information about. |
Parameter | In the Key box, type the key that you want to extract, or select the value from the lookup. |
Path parameter | In the Element list, select the position index, and in the Parameter box, type the key name within the path element that you want to extract. |
Stem element | In the Element section, use lists to select the indexing position. |
HTTP Request or Response Headers |
|
Request or response content |
|
To set transformations for a custom field
After the system has extracted the data, you can modify this data before storing it in the session record. The system supports a variety of built-in transformations, such as substring extraction, regular expressions, and lookup mappings.
- Ensure that you have set the traffic selection and the data source.
- If necessary, point to the Administration > Data flow settings, and then click Custom fields. Then expand the custom field which extraction rule you want to edit, and click Edit rule.
- Click Add transformation.
If you have already configured transformations, select where in the order of execution to add the new transformation. - In the Transformation list, click a transformation type. For more information about transformation types you can use the following table to configure the transformation.
Transformation types for custom fields
Transformation | Description |
---|---|
Case conversion | Applies one of the following case conversions:
|
Find/Replace | Replaces all occurrences of a specific substring with another static string. |
Geolocation substitution | Converts to a geolocation identity, such as City, ISP, or Region. |
Indexed substring extraction | Extracts a portion of a string based on a specified index. For example, extract the first 12 characters. |
IP mapping | Converts an IP address to its corresponding value, according to a defined mapping. For the #Mode parameter, you can specify user, original, or none, as in the following examples:
|
Prepend/Append | Connects a static string to the extracted value at the beginning or the end. |
Regular expression | Applies a regular expression to your data source. |
String mapping | Converts a string from the source data to its corresponding value in a defined mapping.
For the #Mode parameter, you can specify user, original, or none, as in the following examples:
|
Substring extraction | Extracts or deletes a portion of a string.
|
Whitespace trimming | Deletes all leading and trailing spaces around a string. |
Value counter | Counts the number of substrings within a string separated by a token, such as semicolon or comma. |
- (Optional) To test the transformation, click Test transformation and follow the on-screen instructions.
- Click Save.
The system adds the extraction rule for the custom field.
Related topics
Using-request-or-response-content-as-data-sources
Priorities-of-extraction-rules
Defining-a-custom-field-extraction-domain
Verifying-content-extraction-for-a-custom-field