setSegments method

dynamic setSegments(
  1. List<String> segments
)

Implementation

setSegments(List<String> segments) {
  if (segments.isEmpty) return;

  for (var value in segments) {
    appendScript(
        'window.\$crisp.push(["set", "session:segments", [["$value"]]]);');
  }
}