> ## 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 WordPress with Tapfiliate

> This guide walks you through connecting your WordPress website with Tapfiliate using the official plugin and shortcode.

November 9, 2026

In this article, we will cover:

* [Why WordPress is a powerful integration for Tapfiliate](#h_72146b9495)
* [What you need before starting the integration](#h_f11e394b59)
* [Step-by-step setup](#h_c9fc0e4624)
* [Advanced optional features](#h_3b666afdce)
* [Testing and verification](#h_3b32ee9969)

## Overview of Wordpress Integration

Tapfiliate makes it easy to bring powerful affiliate tracking to your WordPress website. Simply install our lightweight plugin and configure the redirect on your “Thank You” page with query parameters. Then use our shortcode to capture affiliate-driven conversions. This is perfect for businesses selling physical or digital products directly on WordPress.\

**With this WordPress integration, you can:**

* Track affiliate-driven visits and sales
* Attribute commissions (based on order amount) automatically
* Monitor performance in real time

**A few things to know:**

* Tracking runs when the customer lands on your WordPress Thank You page and the necessary URL query parameters are present.
* Features like subscription renewals, multiple currencies, coupon-code attribution, lifetime/recurring commissions aren’t handled automatically by this basic plugin + shortcode method.

## Prerequisites of Integrating with wordpress

To successfully integrate, ensure you have the following:

* A **Tapfiliate account** and your unique **Account ID**.
* A **[WordPress site](https://wordpress.com/sites)** where you can install plugins.
* Your **WordPress site must be running PHP version 8.0 or higher.** Older PHP versions are not supported by the Tapfiliate plugin.
* A **“Thank You” page** in WordPress, this is the page users are redirected to after completing payment or checkout.
* Your **checkout or redirect process** must pass query parameters (e.g. amount, invoice\_id) in the URL when redirecting to the Thank You page.

## Integration Steps to be completed

### 1. Install the Plugin

1\. In your WordPress dashboard, go to **Plugins → Add New**.\

2\. Search for **“Tapfiliate”**.

![](https://mintcdn.com/tapfiliate-help/1iW9-M7MOhKRwS9v/images/3511688/01-b26d4dae-51ca-4c8c-8853-2efd74e33ff6.png?fit=max\&auto=format\&n=1iW9-M7MOhKRwS9v\&q=85\&s=02efdd970b412bb79a1c397a2972c080)

3\. Click **Install** and then **Activate** the plugin.

### 2. Configure the Plugin

1. In WordPress Admin, navigate to **Settings → Tapfiliate**.
2. Enter your **Tapfiliate Account ID**.
3. Click **Save** to store your settings.

### 3. Configure Redirect URL with Query Parameters

After checkout, configure your payment processor or system to redirect the user to a URL like:\

[https://yourdomain.com/thank-you/?sub\_id=1234\&invoice\_id=5678\&amount=100](https://yourdomain.com/thank-you/?sub_id=1234\&invoice_id=5678\&amount=100)

* sub\_id, invoice\_id, and amount are query parameters carrying the conversion data.
* Ensure the **Thank You page** resides on your WordPress site and includes those parameters.

### 4. Place the Shortcode on the Thank You Page

Edit your WordPress Thank You page and insert this shortcode where you want tracking to occur:\

`[tapfiliate customer_id_query_param="sub_id" external_id_query_param="invoice_id" amount_query_param="amount" currency="USD"]`

This tells Tapfiliate:

* customer\_id comes from the query parameter sub\_id
* external\_id comes from invoice\_id
* amount comes from amount
* currency is explicitly set to USD

If you want to pass currency dynamically via the URL, use the argument:\

`currency_query_param="currency"`

You can also view our instruction video on how to integrate your wordpress account with Tapfiliate.

[Video](https://www.loom.com/embed/d62c65270b104127bc45a5c3877d4102)

## Advanced or Optional Features

### 1. JavaScript-Based Integration (Instead of Plugin)

If you prefer not to use the Tapfiliate WordPress plugin, you can integrate Tapfiliate manually using JavaScript.\

You’ll need a third-party plugin that allows custom code snippets to be added to pages.\

We recommend using **WPCode** (previously known as *Insert Headers and Footers*).

**Steps:**\

**1. Install WPCode** from your WordPress dashboard (Plugins → Add New → Search “WPCode”).

![](https://mintcdn.com/tapfiliate-help/1iW9-M7MOhKRwS9v/images/3511688/02-083fac9d-2b58-4850-a99d-c53c240ca062.png?fit=max\&auto=format\&n=1iW9-M7MOhKRwS9v\&q=85\&s=cee7237c9bf29907ebadadde070c5f52)

**2. Add the detect code to all pages**:

* Create a new header snippet in WPCode.

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: "javascript" });
tap('detect');
</script>
```

Save and make sure it loads **site-wide** in the header.

**3. Add the conversion code to your Thank You page only**:\
Create another snippet in WPCode and restrict it to your Thank You page.\

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: "javascript" });
tap('conversion', 'EXTERNAL_ID', 49.99, { customer_id: 'CUSTOMER_ID' });
</script>
```

Replace EXTERNAL\_ID, 49.99, and CUSTOMER\_ID with your dynamic values (e.g., order ID, total amount, and user/customer ID).

This setup works exactly like the plugin, it tracks visits via the detect script and logs conversions from your Thank You page.\

This method is ideal for developers or advanced users who want flexibility or don’t wish to use the plugin interface.

**2. PayPal Integration**

If your checkout process uses **PayPal**, you can integrate Tapfiliate tracking by mapping the transaction ID (tx), amount (amt) and currency (cc) that PayPal adds to your Return URL in your shortcode.

**Step 1: Update Your Shortcode**\

`[tapfiliate external_id_query_param="tx" amount_query_param="amt" currency_query_param="cc"]`\

Then click **Save**.

**Step 2: Configure PayPal**

1. Log in to your **PayPal Business Account**.
2. Click the **Settings (gear icon)** in the top right → **Account Settings**.
3. From the left menu, choose **Website Payments**.
4. Find **Website Preferences** and click **Update**.
5. Turn **Auto Return** to “On” and enter your **Return URL** (your Thank You page).
6. Turn **Payment Data Transfer (PDT)** to “On”.

**Note:** PayPal integration is only available for **Business Accounts**.

**3. Memberful Integration**

If you are using **Memberful** to manage memberships or subscriptions on your WordPress site, follow the steps outlined in the official [**Memberful Integration Guide**](https://support.tapfiliate.com/integrations/supported-integrations/memberful-integration.md).

This ensures recurring payments and subscription renewals are tracked correctly within Tapfiliate.

**4. Postback / S2S Tracking**

For more advanced server-to-server tracking, Tapfiliate supports **Postback (S2S)** integration.

This approach allows you to send conversion data directly from your backend, bypassing browser-based tracking.

This method is typically used for:

* Custom checkout systems
* External payment gateways
* Complex affiliate programs that need higher reliability

You can find the full implementation details in the **Tapfiliate Postback / S2S Guide**.

## Test and Verify Your Setup

1. Use an affiliate link to visit your site.
2. Complete a test checkout or payment.
3. Verify that the redirect URL contains the query parameters.
4. Check your **Tapfiliate dashboard** to ensure the conversion is attributed correctly.

Example Scenario\

**Redirect URL after payment:**\

[https://example.com/thank-you/?sub\_id=1234\&invoice\_id=5678\&amount=100](https://example.com/thank-you/?sub_id=1234\&invoice_id=5678\&amount=100)\

**Shortcode on Thank You page:**\

`[tapfiliate customer_id_query_param="sub_id" external_id_query_param="invoice_id" amount_query_param="amount" currency="USD"]`\

**Result:**

* sub\_id=1234 → Customer ID
* invoice\_id=5678 → External/Order ID
* amount=100 → Sale amount
* currency=USD

Tapfiliate records this as a conversion for the affiliate who referred the click.

**Key Notes**

* The **Thank You page must be on WordPress** so the shortcode executes.
* The **redirect URL must include** all query parameters mapped in your shortcode.
* Missing parameters can cause incomplete tracking.
* For **dynamic currencies**, use `currency_query_param="currency"` if your redirect URL includes ?currency=USD or similar.
* Always test the full conversion flow: *Affiliate link → Checkout → Thank You page → Dashboard validation*.

**Need More Help?**\

If you have any questions or if something in this guide is unclear, please don't hesitate to 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.