# Individual Tracking for Consent (/docs/consent-management/reference/individual-tracking)

## Overview [#overview]

Transcend only provides consent analytics in an anonymous and aggregated format. This is as much a principle as it is practical. As a privacy company helping its customers give their users privacy controls, we minimize the amount of personal data we collect. Practically, having your consent manager collect individual user analytics carries risk: it can result in our consent software being blocked by browser extensions.

If you plan to track consent event data at an individual level, it's better to separate concerns and have your analytics software collect the analytics, and your consent software collect consent.

Your analytics infrastructure is purpose-built for this type of tracking, so using it will fit better into your existing analytics and BI workflows.

## How to Collect Consent Events [#how-to-collect-consent-events]

<Callout type="info">
  **The following snippets will demonstrate with Segment's analytics.js**

  [Segment](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#basic-tracking-methods) is a popular analytics tool—you can make it your own by replacing the calls to `analytics.track` with your own tracking code.
</Callout>

### Additional Metadata That Might be Useful for Your Events [#additional-metadata-that-might-be-useful-for-your-events]

You might want to add some additional metadata to your events, such as which version of airgap you're on, which regime the user is in, or which choices are available to the user:

```javascript
/**
 * Get additional metadata for consent events
 * @see https://docs.transcend.io/docs/consent/reference/api
 */
function getConsentMetadata() {
  return {
    airgapVersion: airgap.version,
    purposeTypes: airgap.getPurposeTypes(),
    userRegime: airgap.getRegimes(),
  };
}
```

### Listening for Consent Change Events [#listening-for-consent-change-events]

You can add an event listener to listen for consent change events

```javascript
// Listen for consent change events
airgap.addEventListener(
  'consent-change',
  ({ detail: { consent, oldConsent, changes } }) => {
    // Track using Segment's `analytics.js`
    analytics.track('Consent Changed', {
      consent,
      oldConsent,
      changes,
      ...getConsentMetadata(),
    });
  },
);
```

### Other Lifecycle Events [#other-lifecycle-events]

When a user starts a session, you may want to track the initial consent state

```javascript
analytics.track('Consent Initialized', {
  consent: airgap.getConsent(),
  ...getConsentMetadata(),
});
```

## Final Considerations [#final-considerations]

It's important to note that tracking inviduals' consent events can come with a unique challenge: if tracking these events requires consent, or if the user can opt out of these events, you would introduce a heavy selection bias in your resulting dataset (another reason why Transcend only collects anonymous analytics!). Thus, you should consider whether these events will have any interplay with the governance rules that you set in Transcend.
