# Getting Started

The first and most crucial step is to install the **ReferralHero Global Tracking Code** on your website. This step is mandatory to ensure that your referral campaign can track user activities across your site and function correctly.

**Follow these steps to add the Tracking Code to your website:**

**Step 1 : Access Your Campaign Dashboard:**

* Log in to your ReferralHero account.
* Navigate to your campaign dashboard and select **Launch**.
* Copy your unique Global Tracking Code from this section.

<figure><img src="/files/NV4Kg9MyL3Dg5YO0Ogzs" alt=""><figcaption></figcaption></figure>

**Step 2 : Add the Tracking Code to Your Website:**

* Insert the **Global Tracking Code** into the `<head>` section of your website's HTML. This ensures the code is loaded on every page of your site, enabling comprehensive tracking of user interactions.
* **Verify the Installation**: Ensure that the code is correctly placed by checking your site's source code or using browser developer tools.

<figure><img src="/files/dqjX6Mj4mtLjphGK6kmx" alt=""><figcaption></figcaption></figure>

**Step 3 : Enable the Global RH Object**:

* Once the Global Tracking Code is installed, your web pages will have access to the global `window.RH` object. This object is essential for interacting with ReferralHero’s features and tracking user actions.

By completing these steps, you ensure that your website is fully integrated with ReferralHero.


---

# 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://support.referralhero.com/integrate/javascript-web-api/getting-started.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.
