# ExpressVPN Integration

> Integrate ExpressVPN with AnyTrack for improved conversion tracking and attribution. Maximize affiliate marketing ROAS with real-time data to ad platforms.

## ExpressVPN Integration Overview

Track conversions from ExpressVPN users. With AnyTrack, measure user activity after visitors click your affiliate links and send conversion data directly to your ad platforms including Google Ads, Facebook `Conversion API`, and TikTok for optimization.

> This integration relates to the ExpressVPN affiliate program that was running on Post Affiliate Pro. During 2023, ExpressVPN migrated their program to the <a href='/docs/impact'>Impact affiliate network</a>.

<Prerequisites
  title="Before you begin"
  items={[
    { label: "You have an AnyTrack account with a paid subscription", done: true },
    { label: "You have an active ExpressVPN Integration affiliate account", done: true },
    { label: "The AnyTrack Tracking Tag is installed on your website", done: true },
  ]}
/>

### How the ExpressVPN AnyTrack integration works

1. **Traffic**: AnyTrack collects traffic source data and first-party data when visitors land on your website.
2. **Engagements**: When visitors click your ExpressVPN affiliate links, AnyTrack collects granular data tied to the `OutboundClick` event and triggers Event Tracking API requests to your Tracking Tags and analytics.
3. **Conversions**: AnyTrack receives real-time conversion data through the Postback URL when visitors convert on the merchant's website.
4. **Attribution**: AnyTrack processes conversion data and reports it across various sections of the AnyTrack Dashboard.
5. **Conversion API**: AnyTrack sends your conversions to your **Ad Platforms' Conversion API** to feed your ad platform's machine learning and automatic optimization with 100% of your conversion data.

### Technical details

| Reference       | Value          | Information                                                                        |
| --------------- | :------------- | :--------------------------------------------------------------------------------- |
| Tracking Group  | `impact`       | The Tracking Group reference can be used to activate <Glossary>AutoTag</Glossary>. |
| Subid Parameter | `subId1`       | The Subid Parameter used to pass the AnyTrack `click_id`.                          |
| Tracking Method | `Postback URL` | -                                                                                  |

### Standard Conversions

| Event Name      | Details                                             | Data Source     |
| :-------------- | :-------------------------------------------------- | :-------------- |
| `OutboundClick` | When a visitor clicks on ExpressVPN offer links.    | AnyTrack JS Tag |
| `Lead`          | When a free registration is recorded in ExpressVPN. | Postback URL    |
| `Purchase`      | When a user generates a commission in ExpressVPN.   | Postback URL    |

### The ExpressVPN Postback URL

The Postback URL is fully pre-defined and ready for implementation with your ExpressVPN account.

```http
https://t1.anytrack.io/hBtoE3hN/collect/expressvpn?commission=${commission}&orderid=${orderid}&countrycode=${countrycode}&data1=${data1}&data2=${data2}&salesorderamount=${salesorderamount}&datetime=${datetime}&channel=${channel}
```

## Setup Guide

### Step 1: Add ExpressVPN to your AnyTrack Account

1. Go to the **[Integration Catalog](https://dashboard.anytrack.io/catalog/)** and search for ExpressVPN.
2. Click on the [ExpressVPN card](https://dashboard.anytrack.io/catalog/expressvpn) and click **Install**.

### Step 2: Connect your ExpressVPN account

1. Copy the Postback URL from your AnyTrack account.
2. Go to your ExpressVPN affiliate account.
3. Navigate to the "Sales Tracking Code" section.
4. Edit the "Global" tracking code.
5. Paste the Postback URL.
6. Select "Call URL from server".
7. Select "Execute on commission creation and approval".
8. Save your changes.

### Step 3: Adjust the Conversion Event Mapping

The Event Mapping allows you to define which events to track and map them to Conversion Events you will forward to your Ads Integrations (e.g., Facebook `Conversion API`).

---

## Validate your integration

This section will help you validate the main aspects of your setup.

<Callout icon="🔎" theme="default">
  ### Install the AnyTrack Pixel Helper Extension

  Install the [AnyTrack Pixel Helper](https://chromewebstore.google.com/detail/anytrack-pixel-helper/ojmhkmdpagjeopleoeihbhgejcfoijjn) Chrome extension to verify the AnyTrack Tracking Tag is installed on your website. It also shows connected ad platforms and browser-side events. [View the Pixel Helper guide](/docs/anytrack-chrome-extension).
</Callout>

### Link tracking

Since tracking starts when visitors click on offer links, verify that your links are tracked and AutoTagged.

### AutoTag Methods

<Callout icon="🔥" theme="default">
  ### Reminder about AutoTag

  **AutoTag** is a function enabled by default through the AnyTrack Tracking Tag that appends `subId1` and `click_id` data to affiliate links. Learn [more about AutoTag](/docs/autotag).
</Callout>

* **Default**: AnyTrack automatically identifies and AutoTags ExpressVPN links found on your website.
* **AutoScan**: AnyTrack scans links embedded in redirect plugins and AutoTags them accordingly.
* **Manual**:
  * **Tracking Group Attribute**: Add the tracking group attribute to links according to their tracking requirements. For example: `data-tracking-group="expressvpn"` or `rel="expressvpn"`. More about [Tracking Group](/docs/tgid).
  * **Click ID Token**: Manually append the `subid`: `&subId1=--CLICK-ID--` to the offer link.

Once the links are set up, check your ExpressVPN account reports to verify the `subId1` parameters are passed to the offer links.

**Here is an example of how to manually update links from ExpressVPN:**

```html
<a href="https://example.foo/goto/expressvpn" data-tracking-group="expressvpn">Hover on the ExpressVPN Demo Link to see the AnyTrack `click_id`</a>
```

<HTMLBlock html={"\n<a href=\"https://example.foo/goto/expressvpn\" data-tracking-group=\"expressvpn\">Hover on the ExpressVPN Demo Link to see the AnyTrack <code>click_id</code></a>\n"} />

> 📘 **Tracking**
>
> Tracking Group refers to the integration technology. For example, ExpressVPN <Glossary>Tracking Group</Glossary> is `expressvpn` and ClickBank is `ClickBank`. <Glossary>The Tracking Group</Glossary>

### Conversion Tracking

To validate your setup, wait for a conversion to occur or trigger a test conversion yourself and inspect the conversion logs.

**ExpressVPN conversion payload example**

```json
{
  "AnyTrack": "1100l35864",
  "customer_type": "existing",
  "country": "US",
  "referer": "https://www.chewy.com/",
  "search_keyword": null,
  "search_engine_id": null,
  "conversion_time": "1684692689",
  "`conversion_id`": "1011l2002827904",
  "publisher_reference":"mz7yYainzaN6hkc52QVBg",
  "publisher_commission": "10.57",
  "creative_id": "0",
  "source_referer": null,
  "advertiser_reference": null,
  "conversion_type": "1",
  "creative_type": "0",
  "conversion_reference": "1354998698",
  "metadata_query_string": null,
  "currency": "USD",
  "tracking_method": "clickref",
  "value": "52.85",
  "items": [
    {
      "item_code": null,
      "item_id": "1011l860699483",
      "item_sku": "332503",
      "item_commission": "3.5720",
      "item_type": "S",
      "item_gp": null,
      "item_publisher_commission": "3.5720",
      "item_meta": null,
      "item_status": "1",
      "item_value": "17.8600",
      "item_category": "11130",
      "item_vertical": null
    },
    {
      "item_code": null,
      "item_id": "1011l860699484",
      "item_sku": null,
      "item_commission": "0.0000",
      "item_type": "S",
      "item_gp": null,
      "item_publisher_commission": "0.0000",
      "item_meta": null,
      "item_status": "1",
      "item_value": "0.0000",
      "item_category": "COMMISSION",
      "item_vertical": null
    },
    {
      "item_code": null,
      "item_id": "1101l859617416",
      "item_sku": "677350",
      "item_commission": "6.9980",
      "item_type": "S",
      "item_gp": null,
      "item_publisher_commission": "6.9980",
      "item_meta": null,
      "item_status": "1",
      "item_value": "34.9900",
      "item_category": "2802",
      "item_vertical": null
    }
  ],
  "campaign_id": "1100l517",
  "query_string": null,
  "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1"
}
```

---

<FaqAccordion
  title="FAQ and Troubleshooting"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "Can I import past conversions into AnyTrack?",
      answer: "No. AnyTrack can only ingest conversions triggered following a visitor session on your website."
    },
    {
      question: "Can I use a different <code>subid</code> parameter than the one predefined by AnyTrack?",
      answer: "No."
    },
    {
      question: "Can I track conversions without the <code>click_id</code>?",
      answer: "No. The <code>click_id</code> passed to the ExpressVPN links is required to track conversions."
    },
    {
      question: "The Conversion Event Name is not what I am expecting, how can I change it?",
      answer: "Update the Event Mapping in the Integration page."
    }
  ]}
/>
