setSessionValue method

  1. @override
void setSessionValue(
  1. String param,
  2. dynamic value
)
inherited

Sets a session variable value. The value is persistent for the life of the Analytics instance. This variable will be sent in with every analytics hit. A list of valid variable names can be found here: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters.

Implementation

@override
void setSessionValue(String param, dynamic value) {
  if (value == null) {
    _variableMap.remove(param);
  } else {
    _variableMap[param] = value;
  }
}