# 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**](https://docs.crobox.com/getting-started/first-steps/broken-reference)\
  Add the snippet directly to your website code.
* [**Google Tag Manager Snippet Implementation**](https://docs.crobox.com/getting-started/first-steps/broken-reference)\
  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.

![](https://1240120646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6BXLJuZMkdXQg6osAC%2Fuploads%2Fgit-blob-74ff49219c2b63ea519c52bf9c49005398221fd7%2F3.png?alt=media)

#### Step 2: Rename the tag

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

![](https://1240120646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6BXLJuZMkdXQg6osAC%2Fuploads%2Fgit-blob-701188d1d4b9fe641083ffcf6abafc8016c56acd%2F4.png?alt=media)

#### Step 3: Choose the tag type

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

![](https://1240120646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6BXLJuZMkdXQg6osAC%2Fuploads%2Fgit-blob-a8082c17fb8686d015d41211f8d2c4885299d9a8%2F5.png?alt=media)

#### Step 4: Paste your Crobox snippet

Paste the snippet from your Crobox environment into the tag.

![](https://1240120646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6BXLJuZMkdXQg6osAC%2Fuploads%2Fgit-blob-e0bf22d43a55a221d70bd5a0d6a442b1f5defbad%2F6.png?alt=media)

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

![](https://1240120646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6BXLJuZMkdXQg6osAC%2Fuploads%2Fgit-blob-004d287314fd343451e6b5bb852658ab141a9ff4%2F7.png?alt=media)

#### 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 %}

![](https://1240120646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6BXLJuZMkdXQg6osAC%2Fuploads%2Fgit-blob-7902e6c7799e26f6f4355d37aef3a8e76a76e5a1%2F8.png?alt=media)

#### Step 6: Publish your changes

Once the tag is ready, publish the container.

### Next step

Once the snippet is live, set up [**event tracking**](https://docs.crobox.com/getting-started/first-steps/event-tracking-implementation).

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>
