> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firstpromoter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Tag Manager

> Setting up your Main tracking script in Google Tag Manager (GTM)

`Difficulty: Intermediate` <br />
`Developer Required: Yes`

With FirstPromoter you can setup click and signup tracking using our Google Tag Manager option.
This setup mainly requires you to add tracking scripts into your Google Tag Manager and sending details about the referrals using the script.
Depending on the complexity of your website it is ideal to have a developer assist you in the setup.

<Tip>This procedure assumes you have already set up GTM to work on your website.</Tip>

1. To get started on FirstPromoter:
   * [Login](https://login.firstpromoter.com/) to your admin account.
   * Navigate to Settings > Integrations > Integrate your website section of your dashboard.
   * Click on the `Integrate` button.
   * Click on the `setup` button or click on the `change` link for a new setup instructions.
   * Under `Custom integration`, select the `JS` option.
   * Copy the `Main tracking script` under the `JavaScript` tab.

2. Log in to Google Tag Manager:
   * Navigate to your `Tags` section
   * Click on `New` button (at top right corner)
   <img height="150" src="https://mintcdn.com/firstpromoter/rNk-Jdvp2vdjAvd9/images/gtm/image-1.png?fit=max&auto=format&n=rNk-Jdvp2vdjAvd9&q=85&s=89f457c3a95c999013a3c3aca1dec124" data-path="images/gtm/image-1.png" />
   * Click on the `Tag configuration` panel to open the TAG type selection panel.
   <img height="150" src="https://mintcdn.com/firstpromoter/rNk-Jdvp2vdjAvd9/images/gtm/image-2.png?fit=max&auto=format&n=rNk-Jdvp2vdjAvd9&q=85&s=116954dbba2ae52ff326882952268648" data-path="images/gtm/image-2.png" />
   * Scroll down and select the `Custom HTML` option
     <img height="150" src="https://mintcdn.com/firstpromoter/rNk-Jdvp2vdjAvd9/images/gtm/image-3.png?fit=max&auto=format&n=rNk-Jdvp2vdjAvd9&q=85&s=5405e949eab8bb3428867f35ee9dc6d8" data-path="images/gtm/image-3.png" />
   * Add/paste the `Main tracking script` copied from FirstPromoter into the `HTML` Section. As shown in the screenshot below:
     <img height="150" src="https://mintcdn.com/firstpromoter/rNk-Jdvp2vdjAvd9/images/gtm/image-4.png?fit=max&auto=format&n=rNk-Jdvp2vdjAvd9&q=85&s=2868fc13ca6b441b0026ff0f9df6ea52" data-path="images/gtm/image-4.png" />
   * Now, you need to select when Google Tag Manager should trigger the script. To do this, scroll down to the `triggering` section, click on it and choose when to trigger the tag. <Tip>We recommend selecting the `pages trigger` to load the `Main tracking script` on all your landing pages.</Tip>
     <img height="150" src="https://mintcdn.com/firstpromoter/rNk-Jdvp2vdjAvd9/images/gtm/image-5.png?fit=max&auto=format&n=rNk-Jdvp2vdjAvd9&q=85&s=d756d3574745bddf8d0350acc12b8a0c" data-path="images/gtm/image-5.png" />
     <img height="150" src="https://mintcdn.com/firstpromoter/HBqmI3s-Wsq4TZSL/images/gtm/image-5a.png?fit=max&auto=format&n=HBqmI3s-Wsq4TZSL&q=85&s=948bdf9821ebb8588f1988f6e9713b9b" data-path="images/gtm/image-5a.png" />
   * Rename/change the name to `FirstPromoter Main Tracking Script`
     <img height="150" src="https://mintcdn.com/firstpromoter/HBqmI3s-Wsq4TZSL/images/gtm/image-6.png?fit=max&auto=format&n=HBqmI3s-Wsq4TZSL&q=85&s=a70fd0845ae41ae206b974492ff17158" data-path="images/gtm/image-6.png" />
   * Save and publish your changes.
     <img height="150" src="https://mintcdn.com/firstpromoter/HBqmI3s-Wsq4TZSL/images/gtm/image-7.png?fit=max&auto=format&n=HBqmI3s-Wsq4TZSL&q=85&s=d1c11ff50953fe868ba1ab5da3810f94" data-path="images/gtm/image-7.png" />
