# Crobox Snippet Implementation

Integrating the Crobox snippet is the first step in your setup. Add the snippet to every page of your website. You can do this manually or through Google Tag Manager.

### Choose your setup method

* [**Manual Snippet Implementation**](broken://spaces/-M6BXLJuZMkdXQg6osAC/pages/-M6FUW6WSbCe2A-VNFxm)\
  Add the snippet directly to your website code.
* [**Google Tag Manager Snippet Implementation**](broken://spaces/-M6BXLJuZMkdXQg6osAC/pages/-M77oM8Uy0c03IxmANSV)\
  Add the snippet through a GTM tag that fires on all pages.

{% hint style="info" %}
Use the snippet that belongs to your Crobox environment. You can find it in **Settings → Website Integration → HTML** or **Javascript (alternative)**.
{% endhint %}

### What matters most

* Add the snippet to **every page**
* Load it from your own Crobox environment
* In GTM, fire the tag on **All Pages**
* Do not copy the example values below into production

{% hint style="warning" %}
The examples below show the structure only. They are not valid for your environment.
{% endhint %}

### Manual implementation

If you manage your website code directly, place the Crobox snippet in the `<head>` of every page.

This is usually the simplest setup when you control the template or frontend directly.

```markup
<!-- Crobox Javascript Snippet -->
<script src="//cdn.crobox.io/js/000000.js" async defer></script>
```

{% hint style="warning" %}
It is important to load the snippet on every page, since Crobox collects data across the full funnel.
{% endhint %}

### Google Tag Manager implementation

If you use Google Tag Manager, create a **Custom HTML** tag and paste in your Crobox snippet.

Then set the trigger to **All Pages**.

That ensures Crobox loads across the full funnel.

#### Step 1: Create a new tag

Open Google Tag Manager in the workspace for your website and create a new tag.

![](/files/-M6FUZqY3vY3UYFgnrYy)

#### Step 2: Rename the tag

Rename the tag to something clear, such as **Crobox Javascript Tag**.

![](/files/-M6FUZqZp1GasW7mPyll)

#### Step 3: Choose the tag type

Select **Custom HTML** as the tag type.

![](/files/-M6FUZq_tYMYexqyRf6J)

#### Step 4: Paste your Crobox snippet

Paste the snippet from your Crobox environment into the tag.

![](/files/-M6FUZqalfVQnjH7y_Gr)

{% hint style="warning" %}
Each Crobox snippet is unique. Use the snippet from your own environment or the one shared by your Crobox contact.
{% endhint %}

![](/files/-M6FUZqbf0r2NoLPQ2fO)

#### Step 5: Set the trigger

Open **Triggering** and set the tag to fire on **All Pages**.

{% hint style="warning" %}
If the tag only fires on part of the site, tracking and experiences will be incomplete.
{% endhint %}

![](/files/-M6FUZqcUS9a0HvyXWK3)

#### Step 6: Publish your changes

Once the tag is ready, publish the container.

### Next step

Once the snippet is live, set up [**event tracking**](/getting-started/first-steps/event-tracking-implementation.md).

Event tracking sends pageviews and key actions to Crobox.

### FAQ

<details>

<summary>Does the snippet affect page performance?</summary>

The Crobox snippet is served from a CDN with global coverage for fast delivery.

It is typically smaller than 50 KB before compression, and loads asynchronously with `async` and `defer`.

That means it does not block page parsing or delay rendering.

</details>


---

# 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.crobox.com/getting-started/first-steps/get-started-with-crobox.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.
