Advanced Targeting & Segmentation
This approach allows you to set User Identity and Attributes for Sidecar, enabling you to perform more advanced targeting and results segmentation. By default, Sidecar & Autocapture usestableID (an auto-generated device-level guid that gets stored in the user’s localStorage) for tracking purposes. If you wish to enrich autocapture events with known user identities and attributes, you can define the following object prior to autocapture/sidecar being loaded.
Watch this video tutorial on how to configure more advanced targeting for your Sidecar experiments.
Accessing the Statsig js client
For accessing the underlying Statsig js client instance, you can callStatsigSidecar.getStatsigInstance().
Configuring Runtime Options
This allows you to handle Consent Management, GDPR compliance and more. All of the StatsigOptions provided by the JavaScript SDK are also fully-supported with Sidecar. These can be passed to Sidecar via:Managing Consent
Prior to Sidecar script tag, configure these runtime options to disable browser storage and tracking:Persisting stableID across subdomains
Statsig useslocalStorage as the preferred mechanism for storing the user’s stableID. Localstorage keys do not persist across any origin boundaries including across subdomains. For example, a user visiting https://example.com, https://show.example.com and https://account.example.com would be issued three distinct stableIDs.
If you are assigning a user to a test on one subdomain, and tracking behavior for metrics purposes on a different subdomain, you’ll need to have this solution in place to ensure Statsig can properly attribute cross-origin behavior to the Test Group assignment that took place on the initial experiment domain.
To install, simply paste the following in your HEAD section.