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

# How to Integrate GoHighLevel with Tapfiliate

> This guide walks you through connecting your GoHighLevel (GHL) funnels and workflows with Tapfiliate.

November 9, 2026

In this article, we will cover:

* [Why GoHighLevel is easy to integrate with Tapfiliate](#h_73bcb50054)
* [What you need before starting the integration](#h_1618400381)
* [Step-by-step setup for both click tracking and conversion tracking](#h_832394f72f)
* [Advanced optional features](#h_f77137acf2)
* [Testing and Verification](#h_6319c4a8d1)

## Overview

Tapfiliate can be seamlessly integrated with GoHighLevel (GHL) to enable affiliate click tracking, conversion attribution, coupon/referral-code attribution, and customer-lifetime tracking. By combining page-level Tapfiliate JavaScript with GoHighLevel’s Webhook automation actions, you can create a powerful, automated affiliate tracking system without requiring a native integration.

**Pros:**

* No plugins needed
* Fast setup
* Clean attribution using referral/coupon codes
* Works for funnels, websites, forms, and checkout pages
* API-based conversion tracking is extremely reliable

**Cons:**

* Requires adding code to page headers
* Requires setting up custom fields
* Does not automatically track SKU or product-level commissions
* Incorrect webhook setup can prevent conversions from firing

## GohighLevel integration Prerequisites

To successfully integrate, ensure you have the following:

* A live Tapfiliate account with your [Account ID and API Key](https://support.tapfiliate.com/getting-started/essential-account-settings/how-to-find-account-id-and-api-key.md)
* A [GoHighLevel account](https://www.gohighlevel.com/) with:
  * Access to Funnels / Websites → **Custom Code**
  * Access to **Workflows**
  * Access to **custom Webhook actions**
* A referral code or coupon code created inside Tapfiliate and assigned to an affiliate
* A custom field in GHL to collect that referral code (e.g., **Referral Code**)

## Setting up the GoHighLevel integration

You will configure:

1. Click tracking (page-level)
2. Conversion tracking (workflow-level via webhook)

**Step 1: Set Up Click Tracking (Required)**

Add the Tapfiliate tracking script to your GHL site. In GoHighLevel, navigate to:\

**Sites → Funnels → Settings → Custom Code → Head** and paste this code:

```html theme={null}
<script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
<script type="text/javascript">
(function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
(t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
tap('create', 'YOUR-ACCOUNT-ID', { integration: "custom" });
tap('detect');
</script>
```

Replace **YOUR-ACCOUNT-ID** with your Tapfiliate Account ID.

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13224519/01-7bb98cc0-2b6c-4835-bb87-3d94f8640c3a.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=029f09196c1639df23fced2c9966a522)

This script tracks clicks from affiliate links and stores the visitor’s affiliate information.

**Step 2: Set Up Conversion Tracking**

Conversions will be attributed using referral or coupon codes entered by the customer.

Create a Referral Code Field in GHL

Go to:\

**Settings → Custom Fields → Create Field → Input Field**

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13224519/02-75392150-c19d-4a30-818c-0261690e9c1a.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=095ee8cc6253b7b2a54170b103f22daa)

Use:

* **Label:** Referral Code
* **Field Name:** referral\_code

Add this field to your checkout form, booking form, order form or enrollment form wherever payment or signup happens, or as per your use case.

**Step 3: Add the Conversion Webhook in GoHighLevel**

## Inside GHL:

1. Go to **Automations → Workflows**
2. Click **Create Workflow**
3. Add a trigger such as:
   * **Form Submitted**
   * **Order Submitted**
   * **Tag Applied** (“Purchased”)
4. Click **+ Add Action**
5. Choose **custom webhook**

![](https://mintcdn.com/tapfiliate-help/Q52FWBFGgBPv4--Y/images/13224519/03-12776998-bd45-4259-bc15-1b04d04098d7.png?fit=max\&auto=format\&n=Q52FWBFGgBPv4--Y\&q=85\&s=d0c3d016489686834829cead87e54141)

**Webhook URL**\

[https://api.tapfiliate.com/1.6/conversions/](https://api.tapfiliate.com/1.6/conversions/)

**Headers**

Content-Type: application/json\

x-api-Key: YOUR\_API\_KEY

Replace YOUR\_API\_KEY with your Tapfiliate API key.

**JSON Body (Referral-Code Based Conversion)**

```json theme={null}
{
  "customer_id": "#{{contact.id}}",
  "external_id": "UNIQUE_ORDER_ID",
  "amount": "#{{opportunity.amount}}",
  "referral_code": "#{{contact.referral_code}}"
}
```

**Explanation:**

* \#\{\{contact.referral\_code}} is the code your customer enters
* Tapfiliate matches this to the correct affiliate
* Replace UNIQUE\_ORDER\_ID with a merge field that is unique for every purchase, such as the order or opportunity ID. Don’t use the contact’s email: Tapfiliate rejects a second conversion with the same external\_id as a duplicate, so the contact’s next purchase would not be tracked.

This is the **cleanest and most reliable** integration method for GHL.

## Advanced or Optional Features

1\. Add Metadata to Conversions: You can send purchase info with the conversion (don’t send personal data such as names or phone numbers):

```json theme={null}
{
  "customer_id": "#{{contact.id}}",
  "external_id": "UNIQUE_ORDER_ID",
  "amount": "#{{opportunity.amount}}",
  "coupon": "#{{contact.referral_code}}",
  "meta_data": {
    "source": "GoHighLevel"
  }
}
```

Metadata appears inside Tapfiliate under the conversion record.

2\. Refund or Cancellation Tracking: You can directly disapprove a commission for the conversion when a refund takes place:\

Webhook URL:

HTTP Request: [DELETE](https://developers.tapfiliate.com/api-reference/commissions/disapprove-a-commission)

**`https://api.tapfiliate.com/1.6/commissions/{commission_id}/approved/`**

## Testing and Verification

Follow these steps to ensure tracking is set up correctly:\

1\. Create a Test Affiliate in Tapfiliate: Generate a referral link + referral code.\

2\. Click the referral link: Confirm the click appears inside Tapfiliate.\

3\. Submit your GHL form: Enter the referral code you created.\

4\. Trigger a purchase: Ensure the Workflow webhook fires.\

5\. Verify the conversion: Check your Tapfiliate dashboard → Conversions. It should show the correct affiliate, the revenue amount and any metadata sent.

**Still need help?**\

If you have any questions or if something in this guide is unclear, please contact us at: 📩 **[support@tapfiliate.com](mailto:support@tapfiliate.com).** We’re happy to assist!


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.