# Handling Cookie Consent

## Step 4 - Integrate Cookie Consent

To ensure GDPR compliance, you’ll need to ask users for cookie consent before tracking. The CookieConsent component handles this.

```
import { CookieConsent } from '@pro/analytics/CookieConsent'

function MyApp() {
  return (
    <>
      <CookieConsent>
        🍪 We use cookies to improve your experience. By using our site, you accept cookies.
      </CookieConsent>
      {/* Rest of your app */}
    </>
  )
}
```

* When a user accepts cookies, it automatically enables tracking.
* The cookie consent value is stored, ensuring that analytics only run after consent is granted.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.startupstarterkits.com/ssk-pro-features/index-1/chapter-3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
