setVariable

The setVariable command adds additional context to a session.

To associate additional data with a User Transaction, use the setVariable command. The setVariable command takes a key-value pair and associates it to the current User Transaction and Browser Session. The setVariable command needs to be called for each individual custom variable you would like to set. The setVariable command can be called anytime after the start command is called, just not before. Examples of meta-data key/value variable pairs you may want to track and send are: Applicant ID, Campaign ID, or Funnel Entry Point.

nid('setVariable', key, value);

Parameters

  • setVariable: command
  • key (string): name of the variable to be passed. Use 'funnel' to automatically populate the dashboard with this value.
  • value (string): value for the variable being passed

Funnel

To associate sessions with specific user journeys (as may be the case with different marketing promotions) and differentiate these journeys in the NeuroID dashboard, you may optionally tag sessions using the special reserved funnel key.

nid('setVariable', 'funnel', value);

Parameters

  • setVariable: command
  • funnel (string): A reserved value that indicates this information will be displayed in the dashboard.
  • value (string or number): value for the funnel that you wish to see in the dashboard.
    i.e., nid('setVariable', 'funnel', 'loyalty-program');