SessionCam
Example
Basic code sample to use the Harness FME JavaScript SDK to attach feature flag names and treatments as SesisonCam Custom Variable and enable Session Search via Field filter.
Environment
Harness FME JavaScript SDK 10.9.0
SessionCam Web JavaScript Snippet
How to use
The code below implements both Harness FME and SessionCam's JavaScript libraries, assuming both libraries are loaded in the header section
The Harness FME SDK is wrapped with the class SplitIO
Make sure to update the key and authorizationKeyfields in the factory initialization
FME feature flag treatments are calculated for a list of feature flag names defined in an array variable splitNames
Make sure to update the array with the correct feature flag names
Once the treatments are fetched, the script use
window.sessioncamConfiguration.customDataObjectsto add the flag names as a custom variable name and the respective treatments as the valueA prefix of
split.is added to each feature flag name in the below example
To view the correlated sessions in SessionCam, use the Advanced filter:
Add new filter in the Advanced Filters tab.

Select Field Value option as a filter

Select which feature flag you like to filter. You can enter
split. and SessionCam displays the available stored variable names.
The filter value can be any value of treatments logged, for example to view all sessions with users who received the on treatment, set the value to
on.
Example JavaScript code
Last updated
Was this helpful?