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

# Overview

Fingerprint Fastly Compute Proxy Integration is responsible for proxying identification and agent-download requests between your website and Fingerprint through your Fastly infrastructure. Your website does not strictly need to be behind Fastly to use this proxy integration, although that is optimal for maximum accuracy benefits.

<img src="https://mintcdn.com/fingerprint/JTUbc3rQcwtp3hbV/images/3669df14a42385abf2d0150e62b510f235bdbe56dd3108ae6cb5443b7d971c59-image.png?fit=max&auto=format&n=JTUbc3rQcwtp3hbV&q=85&s=a92f99ea30698075ab5c6c94ef1f508a" alt="" width="2328" height="950" data-path="images/3669df14a42385abf2d0150e62b510f235bdbe56dd3108ae6cb5443b7d971c59-image.png" />

The integration is a JavaScript WebAssembly Compute Service you can deploy to your Fastly account. The source code is [available on GitHub](https://github.com/fingerprintjs/fastly-compute-proxy).

<Warning>
  **Limitations and expectations**

  **Integration in Beta**

  This integration is currently in Beta. If you find any issues, please contact our [support team](https://fingerprint.com/support).

  **Limited to Enterprise plan**

  Support for the Fastly Compute Proxy Integration is provided only for customers on the **Enterprise** Plan.  Other customers are encouraged to use [Custom subdomain setup](/docs/v3/custom-subdomain-setup) or [Cloudflare Proxy Integration](/docs/v3/cloudflare-integration).

  **Manual updates occasionally required**

  The underlying data contract in the identification logic can change to keep up with browser and device releases. Using the Fastly Compute Proxy Integration might require occasional manual updates on your side. Ignoring these updates will lead to lower accuracy or service disruption.
</Warning>

## The benefits of using the Fastly Compute Proxy Integration

* Significant increase in accuracy in browsers with strict privacy features, such as Safari or Firefox.
* Cookies are now recognized as "first-party." This means they can live longer in the browser and extend the lifetime of visitor IDs.
* Ad blockers will not block the Fingerprint JavaScript agent from loading. Requests to Fingerprint domains are stopped by most ad blockers, but requests to same-site URLs are always allowed.
* Ad blockers will not block Fingerprint identification requests since they are sent to a subdomain that belongs to the same site.
* Insight and control over the identification requests that can be combined with other Fastly features like Compute and traffic reports.
* Cookie security: Fastly Compute Proxy Integration drops all the cookies sent from the origin website. The code is open-source, so you can transparently verify this behavior.
* Easy to meet compliance and auditing requirements.

## Integration setup overview

The integration setup consists of the following three steps. Each step is described in detail below.

1. Issue a proxy secret in the Fingerprint dashboard.
2. Create integration path variables.
3. Deploy Fingerprint proxy integration Compute service in your Fastly account.
4. Configure the Fingerprint client agent on your website or mobile app.

## Step 1: Create a Fingerprint proxy secret

Issue a Fingerprint proxy secret to authenticate requests from your Fastly infrastructure.

1. Go to the [Fingerprint dashboard](https://dashboard.fingerprint.com/) and select your workspace.
2. In the left menu, click [**API keys**](https://dashboard.fingerprint.com/api-keys).
3. Click **Create Proxy Key**.
4. Give it a name, for example, `Fastly Compute proxy integration`.
5. Optionally, you can [choose an environment](/docs/v3/multiple-environments#proxy-integrations-and-proxy-secrets) for the proxy secret.
   1. By default, the proxy secret works for all environments in your workspace.
   2. A proxy secret scoped to a specific environment can only authenticate identification requests made with a public API key from the same environment.
6. Click **Create API Key**.

You will use the proxy secret value in the following steps, so store it somewhere safe.

## Step 2: Create path variables

You need to set the path variables you will use throughout your Fastly configuration and the JavaScript agent configuration on your website ([Step 4](#step-4-configure-the-fingerprint-client-agent-to-use-your-service)). These values are arbitrary. Just decide what your values are and write them down somewhere.

In this guide, we will use readable values corresponding to the variable names to make it easier to follow:

```txt theme={"theme":"github-dark-dimmed"}
AGENT_SCRIPT_DOWNLOAD_PATH="AGENT_SCRIPT_DOWNLOAD_PATH"
GET_RESULT_PATH="GET_RESULT_PATH"
```

However, your values used in production should look more like random strings:

```txt theme={"theme":"github-dark-dimmed"}
AGENT_SCRIPT_DOWNLOAD_PATH="vbcnkxb654"
GET_RESULT_PATH="5yt489hgfj"
```

That is because some adblockers might automatically block requests from any URL containing fingerprint-related terms like "fingerprint", "fpjs", "track", etc. Random strings are the safest. So whenever you see a value like `AGENT_SCRIPT_DOWNLOAD_PATH` in this guide, you should use your random value instead.

## Step 3: Deploy the proxy integration Compute service

You can choose from two available installation methods.

### Using Terraform

If you manage your infrastructure using Terraform, you can use the official Fastly Compute Proxy Integration Terraform module. This is the recommended method for deploying the integration. It provides a streamlined, versioned setup with fewer manual steps.

Continue to [Deploy Fastly Compute Proxy integration using Terraform](/docs/v3/deploy-fastly-compute-using-terraform).

### Deploying Manually

If you don't use Terraform, you can manually deploy the integration using the Fastly web interface. This method requires more manual steps.

If you prefer the manual installation method, continue to [Deploy Fastly Compute Proxy integration manually](/docs/v3/deploy-fastly-compute-manually).

## Step 4: Configure the Fingerprint client agent to use your service

1. Use the path variables created in [Step 2](#step-2-create-path-variables) to construct the script download and identification endpoint URLs.
2. Configure the Fingerprint client agent on your website or mobile app accordingly:

<CodeGroup>
  ```javascript NPM package theme={"theme":"github-dark-dimmed"}
  // The same pattern applies to React SDK, Vue SDK, etc.
  import * as FingerprintJS from "@fingerprintjs/fingerprintjs-pro";

  const fpPromise = FingerprintJS.load({
    apiKey: PUBLIC_API_KEY,
    scriptUrlPattern: [
      "https://metrics.yourwebsite.com/AGENT_SCRIPT_DOWNLOAD_PATH?apiKey=<apiKey>&version=<version>&loaderVersion=<loaderVersion>",
      FingerprintJS.defaultScriptUrlPattern, // Fallback to default CDN in case of error
    ],
    endpoint: [
      "https://metrics.yourwebsite.com/GET_RESULT_PATH",
      FingerprintJS.defaultEndpoint, // Fallback to default endpoint in case of error
    ],
  });

  fpPromise.then((fp) => fp.get()).then((result) => console.log(result.visitorId));
  ```

  ```javascript CDN installation theme={"theme":"github-dark-dimmed"}
  const fpPromise = import(
    "https://metrics.yourwebsite.com/AGENT_SCRIPT_DOWNLOAD_PATH?apiKey=PUBLIC_API_KEY"
  ).then((FingerprintJS) =>
    FingerprintJS.load({
      endpoint: [
        "https://metrics.yourwebsite.com/GET_RESULT_PATH",
        FingerprintJS.defaultEndpoint, // Fallback to default endpoint in case of error
      ],
    }),
  );

  fpPromise.then((fp) => fp.get()).then((result) => console.log(result.visitorId));
  ```
</CodeGroup>

<Note>
  **Parameter URL nuances**

  * Note that the import `url` for the CDN installation method and `scriptUrlPattern` used by NPM packages are similar but different and **cannot be used interchangeably**.
  * **Leave the`scriptUrlParam` parameter as displayed here:** `?apiKey=<apiKey>&version=<version>&loaderVersion=<loaderVersion>`. The `apiKey` `version` and `loaderVersion` parameters will be replaced by the values in the NPM package automatically. Do not alter them manually.
</Note>

If everything is configured correctly, you should receive the latest Fingerprint client-side script and the identification result through your Fastly Compute proxy integration.

## Monitoring and troubleshooting the integration

You can go to the integration's status page at `/status` (for example `https://metrics.yourwebsite.com/status`) to check that the integration is running and all required configuration variables have been set correctly.

Inside your [Fingerprint Dashboard](https://dashboard.fingerprint.com/integrations), go to **SDKs & integrations** > **Fastly Compute** to see the usage metrics of your integration. Here you can monitor:

* If the integration is up to date.
* How many identification requests are coming through the integration (and how many are not).
* The error rate of proxied identification requests (caused by missing or incorrect proxy secret).

The information on the status page is cached so allow a few minutes for the latest data points to be reflected.

<img src="https://mintcdn.com/fingerprint/q7SuknsArT5Y4WhX/images/dfacc5f59a0d646fb5e7b21dd7c28e47e65b321d938fe5d382cd02dd8b2806e3-image.png?fit=max&auto=format&n=q7SuknsArT5Y4WhX&q=85&s=c1c43b81901c81ef1ad73727a776f6ca" alt="" width="1866" height="1590" data-path="images/dfacc5f59a0d646fb5e7b21dd7c28e47e65b321d938fe5d382cd02dd8b2806e3-image.png" />

If you have any questions, reach out to our [support team](https://fingerprint.com/support).

### Fastly logging

If your integration isn't working as expected, it can be useful to look at the Fastly Compute service logs. Fastly offers a [variety of logging options and integrations](https://www.fastly.com/documentation/guides/integrations/logging).

For simple debugging purposes, we recommend using [Fastly log-tail](https://www.fastly.com/documentation/guides/compute/testing/):

1. [Install and configure the Fastly CLI](https://www.fastly.com/documentation/reference/tools/cli/#installing) on your machine.
2. Run `fastly log-tail --service-id <SERVICE_ID>` to see a stream of log messages from the integration Compute service.

## Keeping your integration up to date

The Fastly Compute proxy integration does not update automatically. To stay current:

* **If you're managing your integration manually**, regularly check the [GitHub Releases](https://github.com/fingerprintjs/fastly-compute-proxy/releases/) page and follow the [manual deployment steps](/docs/v3/deploy-fastly-compute-manually) to update your service package when needed.
* **If you're using Terraform**, refer to the [Terraform deployment guide](/docs/v3/deploy-fastly-compute-using-terraform#updating-the-integration) to redeploy your package after reviewing the latest release.

If there is a new major version or another reason you need to update your integration, our support team will get in touch with you.

## Cost Calculation

The resources required by the proxy integration fit within the Fastly Free Tier:

* The integration uses 1 out of the 5 available Origins per Compute Service.
* The integration uses 2 out of the 100 available Config Store Items.
* By default, the integration uses 200 out of the 1000 [theoretically](https://docs.fastly.com/products/network-services-resource-limits#service-domain-and-origin-limits) available connections per Compute service. Please contact our support team if you need to configure this value.

For more details on limitations affecting your setup see [Compute resource limits](https://docs.fastly.com/products/network-services-resource-limits).
