# Configuration

**Configuring w3aSDK**

This guide will walk you through the process of configuring w3aSDK and tailoring its settings to meet your specific requirements.

#### **Setting Up w3aSDK**

Below is the configuration API and its parameters, add this to your main application file

(e.g., `App.js` or `index.js`):

```javascript
// File: index.js
import { w3aSDK } from "@web3acquire/w3a";

w3aSDK.configure(
    "<YOUR-SDK-KEY>", // Your web3acquire SDK key
    {
        test: false, // Enable this to verify your setup
        useVisitorId: true, // Disable this to opt out of persistent cookies
        useVisitId: true, // Disable this to opt out of session cookies
        useSessionId: true // Disable this to opt out of server-side session tracking
    } // Optional configuration options with default parameters
);
```

#### **Configuration Flags**

1. **test:** This is used for verifying your setup of w3aSDK, further information [here](https://web3-acquire.gitbook.io/product-docs/technical-guides/react-spa/verify)
2. **useVisitorId**: w3aSDK employs persistent cookies to track visitors over multiple sessions. If you wish to disable persistent cookies due to user opt-out or regulatory concerns, you can easily do so using the `useVisitorId` flag.
3. **useVisitId**: w3a utilizes session cookies to monitor individual visitor sessions. If you need to disable session cookies, either due to user opt-out or regulatory reasons, you can use the `useVisitId` flag.
4. **useSessionId**: w3a leverages server-side session IDs to group all session events under a single session. This works in tandem with `visitId` and can be used as its replacement. If you decide to disable this feature, simply use the `useSessionId` flag.

**Privacy and Compliance**

If you currently use analytics, such as Google Analytics, w3aSDK works in the same manner, so you can follow the same privacy and compliance guidelines you currently have in place.&#x20;

For in-depth information regarding regulatory compliance and data privacy, PIWIK offers comprehensive documentation [here](https://web3-acquire.gitbook.io/product-docs/welcome-to-web3-acquire). As w3aSDK follows the same structure as PIWIK—utilizing persistent cookies, session cookies, and session IDs—the PIWIK guide is also applicable to our platform.

**Our Recommendations**

We deeply value and respect the privacy and anonymity of individuals. Our analytics are designed not to track individual users but to observe group trends and patterns. As a best practice, we recommend:

* **User Transparency**: Always inform your users about the tracking mechanisms in place and the kind of data being collected.
* **Opt-out Option**: Provide users with an easy and accessible option to opt-out of tracking. This not only builds trust but also ensures you're compliant with various data protection regulations.
* **Configuration Flags**: If a user chooses to opt-out, ensure that the configuration flags are set accordingly to disable the respective tracking mechanisms.

By adhering to these recommendations, you can maintain a balance between gathering insightful analytics and upholding user privacy.

<br>
