# SDK Integration Guide

### Prerequisites

* A Cryptique account at [app.cryptique.io](https://app.cryptique.io)
* Access to your website's HTML files or CMS
* Admin access to your website's codebase

***

#### Step 1: Log in to Cryptique

1. Go to [app.cryptique.io/login](https://app.cryptique.io/login)
2. Log in with your credentials

#### Step 2: Navigate to Integrations

<figure><img src="https://3073870688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FestiaGvmpMW0X8pbEDzN%2Fuploads%2F1gsQOZPMKC5m0e7x9jcO%2Fimage.png?alt=media&#x26;token=29f8fcbb-bfad-493e-a90e-9329ed06869b" alt=""><figcaption></figcaption></figure>

1. In the left sidebar, click **"Integrations"**
2. You’ll see your websites and integrations dashboard

#### Step 3: Add a New Website

<figure><img src="https://3073870688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FestiaGvmpMW0X8pbEDzN%2Fuploads%2FlqOiCUkHKY4KNTZTBLmX%2Fimage.png?alt=media&#x26;token=705178b1-1d0b-41b4-b25f-eedb48220d7e" alt=""><figcaption></figcaption></figure>

1. Click **"Add Website"** (top right or in the websites section)
2. A modal opens for website details

#### Step 4: Enter Website Information

<figure><img src="https://3073870688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FestiaGvmpMW0X8pbEDzN%2Fuploads%2F0UZtv8H125nYGyG2NRyI%2Fimage.png?alt=media&#x26;token=0c532332-7317-4e68-a11c-866d3b3af8c4" alt=""><figcaption></figcaption></figure>

1. Enter the website name (e.g., "My Website")
2. Enter the domain where you’ll install the SDK (e.g., `example.com` or `www.example.com`)
3. Click **"Add Website"**

#### Step 5: Copy the Installation Script

<figure><img src="https://3073870688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FestiaGvmpMW0X8pbEDzN%2Fuploads%2FkVZYHWRN7GGcCdiosrHj%2Fimage.png?alt=media&#x26;token=0c977e50-7bca-4a1f-a10c-14c1c27d62e9" alt=""><figcaption></figcaption></figure>

1. After adding, a popup shows the installation script
2. The script will look like this:

```html
<script>
    var script = document.createElement('script');
    script.src = 'https://xxx.xxx.xx/scripts/analytics/1.0.1/cryptique.script.min.js';  
    script.setAttribute('site-id', 'YOUR_SITE_ID_HERE');
    document.head.appendChild(script);
</script>
```

3. Click **"Copy Script"** or copy the code manually
4. Keep the popup open for verification

***

### Troubleshooting

#### Verification fails

1. Check the script is in the `<head>` section
2. Verify the domain matches exactly (including www)
3. Ensure the script is on all pages (or the main template)
4. Wait 5–10 minutes and try again
5. Check browser console for JavaScript errors
6. Verify the site ID is correct

#### Script not loading

1. Check your network tab for 404s on the SDK URL
2. Verify no ad blockers or security software are blocking it
3. Check CORS settings if applicable
4. Ensure JavaScript is enabled

#### Analytics data not appearing

1. Wait 24–48 hours for initial data collection
2. Verify the installation is confirmed as "Verified"
3. Check that visitors are accessing pages with the script installed
4. Ensure your subscription is active

***

### Support

* Email: <support@cryptique.io>
* Documentation: docs.cryptique.io
* Dashboard: [app.cryptique.io](https://app.cryptique.io)

***

### Additional Notes

* The SDK is lightweight and non-blocking
* It automatically tracks page views, sessions, and user interactions
* No additional configuration is required after installation
* The script is compatible with all modern browsers
* Works with both HTTP and HTTPS websites

***


---

# 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://cryptique.gitbook.io/cryptique/technical/sdk-integration-guide.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.
