In Advanced Mode, you can review and modify the actual JavaScript™ function that is called to process the event.
Note: If you make JavaScript changes to an event in Advanced Mode, you can no longer edit the event in Basic Mode. You must continue to edit it in Advanced Mode.
- To return to the Event Wizard mode, click Basic Mode.
- For more information about the V8 JavaScript implementation from Google, see http://code.google.com/apis/v8/embed.html.
Note: Advanced Mode is considered a developer-only feature.
Functions
In Advanced Mode, JavaScript functions can be entered directly into the text editing pane.
Tealeaf provides a set of JavaScript functions that apply to Tealeaf-specific data objects.
In addition to the Tealeaf functions, you can apply any standard ECMAScript functions to your JavaScript.
Note: If a value is set in the JavaScript setFact, that value will override the value to capture section. If the setFact is left unchanged in the JavaScript, it will use the value that was defined in value to capture.
Create a report group for the current event
In Advanced mode, you can specify a new report group for the current event in the Current Events & Report Groups panel.
Property | Description |
---|---|
Name |
The name of the report group |
Description |
A user-friendly description of the report group |
Value Type |
The type of value stored: Numeric or Text . The type applies to the value of the event and not the value of the dimensions. This setting is shared by all dimensions in the report group. |
Report Group |
The report group to which the instance is assigned. |
Tracked Occurrence |
The occurrence of the instance to track for reporting purposes: First per
Session , Last per Session , or Every Occurrence . This setting is shared by all dimensions in the report group. |
Search |
The occurrence in the session to index for search purposes: None , First , Last , or All . This setting is shared by all dimensions in the report group. |
Report |
The occurrence in the session to store in the report database: None , First , Last , or All . This setting is shared by all dimensions in the report group. |
Flag Every Occurrence in Replay |
The occurrence of the event to flag during the replay of sessions. This setting is shared by all dimensions in the report group.
|
Send to Event Bus |
To send this event & report group instance to the Event Bus for use by other systems, click the check box. |
Validate JavaScript
When you choose to validate the JavaScript you entered in the editing pane, Tealeaf performs some basic yet essential checks of the syntax of your script.
- References to TL objects specified in the
$F
,$P
,$S
, and$H
collections are checked to see if they are valid references. - The JavaScript is passed to the Event Tester for evaluation. The Event Tester contains extra JavaScript validation techniques.
Note: Validation cannot catch problems inside a conditional block that does not run during the evaluation.
- Semicolons are optional in JavaScript. These are not validated.
- JavaScript is checked for circular dependencies (EventA depends on EventA).
Note: JavaScript validation does not check for cross-object circular dependencies (for example, EventA depends on EventB, which depends on EventA).