# Documentation

Reo.Dev can track developers who access your documentation to analyze their interactions and transform this data into actionable insights for your sales funnel. All you have to do is simply add the JavaScript code generated by Reo.Dev on relevant sections of your documentation.

1. Start by clicking on **Integrations**&#x20;

<figure><img src="https://2705882080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx46P5sAHxDG7PqOdVLxI%2Fuploads%2FZGWEVoAtRsGjnGhjHKQK%2Fimage.png?alt=media&#x26;token=b1287cb0-45f2-4714-a6c9-7f5032926042" alt=""><figcaption></figcaption></figure>

2. Click on **'Configure'** in the Documentation card

<figure><img src="https://2705882080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx46P5sAHxDG7PqOdVLxI%2Fuploads%2FrNlIAZwMXtRDAwug6tp5%2Fimage.png?alt=media&#x26;token=d6f6296f-82b4-4711-a146-eb93d685f332" alt=""><figcaption></figcaption></figure>

#### **Step 1: Configure Documentation URL**

1. **Add the documentation URLs** you want to track. You can choose to add multiple base and sub-domain URLs by clicking on ‘Add New’.

<figure><img src="https://2705882080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx46P5sAHxDG7PqOdVLxI%2Fuploads%2FwnFvTl8rVmOUvlAdlaWb%2Fimage.png?alt=media&#x26;token=01593646-e8a2-4a30-af71-692225300e6e" alt=""><figcaption></figcaption></figure>

2. **Add a Page Name** for each base URL

<figure><img src="https://2705882080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx46P5sAHxDG7PqOdVLxI%2Fuploads%2FjRSAufA0IM1lRQNxRS1z%2Fimage.png?alt=media&#x26;token=3ab5d4bf-b6ce-4f47-a12b-78d136b39b90" alt=""><figcaption></figcaption></figure>

Once added, you can create a Segment to view accounts/developers/buyers interacting with each documentation site. The page name will appear under the ‘**Key Docs’** filter while creating segments.

#### Step 2: Add Key Pages

This is an optional step. But we highly recommended adding your high-intent pages e.g, Troubleshooting, API Reference, Installation Guides as key pages so you can track activities on these pages separately.

1. **Add URLs of specific doc pages** you want to track activities on

<figure><img src="https://2705882080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx46P5sAHxDG7PqOdVLxI%2Fuploads%2FC17rU11dQcom7Wv1VaJd%2Fimage.png?alt=media&#x26;token=7000f82c-37fe-4162-83b1-1acf14c41bd5" alt=""><figcaption></figcaption></figure>

2. **Add a Page Name** for each URL

<figure><img src="https://2705882080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx46P5sAHxDG7PqOdVLxI%2Fuploads%2FoqCYhuzy0Ex5hEOvn9ex%2Fimage.png?alt=media&#x26;token=ccd96a6b-c750-4b0f-a2ac-d4f8adac949b" alt=""><figcaption></figcaption></figure>

You can create a Segment to track accounts/developers/buyers who visited those Pages. The page name will appear under **Key Docs Pages filter** while creating segments.

#### **Step 3: Install Tracking Pixel on your Documentation**

Copy the Javascript code snippet and paste it in the \<header> of your site

<figure><img src="https://2705882080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx46P5sAHxDG7PqOdVLxI%2Fuploads%2FulaTNOevlMJQmjje9mM8%2Fimage.png?alt=media&#x26;token=e04c7cd9-3226-4806-a6ab-f38aa1a90b10" alt=""><figcaption></figcaption></figure>

Here are few more ways you can install JavaScript on documentation pages:

1. Using Google Tag Manager. [Here’s the setup guide.](https://docs.reo.dev/integrations/tracking-beacon/install-javascript-for-website-documentation-through-google-tag-manager#for-documentation-tracking-via-gtm)
2. Using NPM Package. [Here’s the setup guide.](https://docs.reo.dev/integrations/tracking-beacon/install-javascript-for-website-documentation-through-google-tag-manager#for-documentation-tracking-via-gtm)

For 3rd party documentation software:

* [Gitbook](https://docs.reo.dev/integrations/developer-docs/gitbook)
* [Mintlify](https://docs.reo.dev/integrations/developer-docs/mintlify)
* [Docusaurus](https://docs.reo.dev/integrations/developer-docs/docusaurus)

#### **Error Scenarios**

* **Script initiation**

  Script initiation has been modified to rely on code initiation only on successful callback post download from CDN. So it will only initiate if successfully downloaded. In case the download fails, the javascript won’t get enabled but this eliminates the likelihood of an error scenario of page breaking.<br>
* **API failure on token delete**

  On deletion of **all** Reo tokens, the most recent event tracking data will likely fail, but subsequent API calls will work fine.<br>
* **Any inadvertent code failure on JavaScript**

  This should not be an issue since the code is wrapped in a try-catch block, the console may throw errors, which won’t be visible even on the console since logger would be disabled on the script.

**Cookie Management and Compliance**

To learn more about Reo.Dev's cookie usage, categorization, and best practices for implementation, refer to this [guide.](https://docs.reo.dev/integrations/tracking-beacon/reo.dev-javascript-cookies-and-consent-guide)

#### **Content Security Policy (CSP) Considerations**

If your website uses a strict Content Security Policy (CSP), you may need to update it to allow our script to load and execute correctly. Please ensure the following directives are updated to include our domains:

**Required CSP Directives**\
\
**Required CSP Directives**\
\
Copy

```
script-srchttps://static.reo.dev;connect-srchttps://api.reo.dev;
```
