> ## Documentation Index
> Fetch the complete documentation index at: https://statsig-4b2ff144-serverless-cloudflare.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Measuring Experiments

> Learn how to measure experiment results using autocapture, manual tracking API, and post-experiment callbacks for analytics integrations.

## Using Autocapture

Sidecar automatically tracks various web activities, allowing you to create both simple and complex Metrics within Statsig console without writing a line of code. Create a new metric in the Metrics tab on the Statsig console to get started, and read more about the metrics we automatically log in [Autocapture on the Web](/webanalytics/autocapture).

See [Autocapture on the Web](/webanalytics/autocapture)

## Using the tracking API

You can track events manually for actions that are not autocaptured by the feature described above.
To track events back to Statsig, you can call `StatsigSidecar.logEvent` which takes the same arguments as the Statsig JS SDK as documented [here](/client/javascript-sdk#logging-an-event). This method can be called prior to completion of the init routine.

```js theme={null}
// example order event
StatsigSidecar.logEvent('Order', null, {
  total: 54.66,
  units: 3,
  unitAvgCost: 18.22
});
```

## Post-Experiment Callback for outbound integrations

You can bind a callback that gets invoked after Sidecar has run experiments (also gets called when there are no experiments),
allowing you to run code that processes the experiment assignments as needed.

*This method should be defined anywhere prior to the Sidecar client script.*

```js theme={null}
window.postExperimentCallback = function(statsigClient, experimentIds) {
  /** 
   * add your own callback routine here
   * ie; annotating 3rd party analytics tools with assignment info
      
    var evarValue = [];
    experimentIds.forEach(function(expId) {
      var inExp = statsigClient.getExperiment(expId, { disableExposureLog: true }).groupName;
      if(inExp) {
        evarValue.push(expId + ':' + inExp);
      }
    });
    evarValue = evarValue.join(',');
   */
}
```

#### Disabling All Logging

To disable all logging to statsig (both autocapture events and logging who has seen your experiments) append the following query string parameter to the Sidecar script URL: `&autostart=0`. This may be useful if you're dealing with GDPR compliance, and you can later re-enable events with `client.updateRuntimeOptions({disableLogging: false})`
