Guide: Enhancing Visitor Detection with Fingerprint's Akamai Proxy Integration

November 21, 2023
November 21, 2023
Enhancing Visitor Detection with Fingerprint’s Akamai Proxy Integration

Identifying website visitors accurately is vital for businesses to provide a seamless, secure, personalized user experience. However, strict browser privacy measures and the growing use of ad blockers have made this task more challenging. As a result, traditional methods like third-party cookies or external identification scripts have become less effective.

Fingerprint offers accurate visitor identification through advanced device intelligence methods that do not rely on cookies. To maximize these identification APIs, they must be seamlessly integrated into your website. Without this integration, ad blockers can interfere with API requests and script loading, making it difficult to identify visitors accurately. Additionally, as some browsers limit third-party cookies, setting up a proxy allows for set first-party cookies with much longer lifetimes.

We developed proxy integrations for cloud services such as AWS CloudFront and Cloudflare, making integrating Fingerprint with your site easy. These integrations act as intermediaries, managing identification requests and script execution between your site and the Fingerprint APIs on your chosen cloud service infrastructure.

This guide will walk you through the steps of setting up our Akamai proxy integration, making it easier to tackle the challenges of visitor identification and maximizing accuracy.

What is Akamai?

Akamai is a leading content delivery and cloud services company specializing in optimizing web content and application delivery. They operate a vast network of thousands of servers strategically located worldwide in over 130 countries. Their expansive network is designed to provide fast, secure, and reliable access to websites and applications.

Many businesses utilize Akamai's services, including e-commerce platforms, media streaming services, and cybersecurity companies. Akamai offers solutions to enhance website security, mitigate distributed denial-of-service (DDoS) attacks, accelerate content delivery, and optimize the user experience. Leveraging Akamai’s CDN, businesses can provide their users an efficient, secure, and high-performing online experience.

What is Fingerprint?

Fingerprint is a device intelligence platform that enables businesses to identify visitors across digital platforms, such as the web and mobile apps. Accurately identifying your visitors is critical in preventing fraud, improving user experiences, and analyzing web traffic.

Fingerprint creates accurate visitor identifiers by analyzing more than 70 signals and can identify up to 99.5% of returning visitors using fingerprinting, fuzzy logic, and server-side processing techniques. These visitor identifiers are stable and remain consistent over months or years.

Additionally, Fingerprint Smart Signals provide instant insights into visitor behavior, such as VPN usage, incognito mode, or bot interactions. These insights are essential for building secure workflows and strengthening websites against potential vulnerabilities.

The Benefits of Using a Proxy Integration

A cloud proxy integration addresses the challenges in identifying visitors due to strict browser privacy settings and ad-blocking software. The proxy processes script loading and visitor identification requests directly through your site instead of loading the Fingerprint JavaScript agent from our CDN.

Enhanced Accuracy

The precision of visitor identification sees marked improvement when using a proxy rather than the CDN-hosted JS agent, particularly with browsers like Safari and Firefox with stringent privacy protocols.

Cookie Longevity

While Fingerprint's technology doesn't rely on cookies, the integration ensures that any used cookies are treated as first-party by the user’s browser, thereby increasing their lifetimes and the durability of the visitor identifiers.

Ad Blocker Resilience

The proxy's ability to route identification requests through the site's URL fortifies the Fingerprint JS agent against interference from most ad-blocking tools.

Simplified Compliance

The integration script drops all the cookies sent from the origin website, removing unnecessary data. Visitor identification requests can also be combined with other Akamai features like property rules and traffic reports. Additionally, its transparent, open-source nature facilitates straightforward verification and compliance checks.

Scalability

This solution grows with your business. It accommodates unlimited subdomains and paths, serving all your sites or customers, regardless of size. It continues to uphold the integrity of a first-party device intelligence system.

The Components of the Fingerprint Akamai Proxy Integration

Akamai Proxy Integration Overview

Akamai Property: An existing Akamai property that uses rules templates to configure how the Dynamic Site Accelerator handles your web traffic.

Terraform Configuration: Terraform property rules and corresponding variables are required to set up the proxy and configure Akamai property rules. The open-source rules and variables are available on GitHub.

Fingerprint Infrastructure: Once set up, your Akamai property will proxy requests to download scripts and identification requests to the Fingerprint APIs with the JS agent.

Setting Up the Akamai Proxy Integration

There are a few prerequisites before you start setting up our Akamai proxy integration.

  • You will need to have an Akamai account and an Akamai property.
  • A Fingerprint Enterprise account plan is required to use the Akamai integration.
  • This guide assumes you use Terraform to manage your site infrastructure on Akamai and that your site uses rules templates with the latest Akamai rule format. Please get in touch with our support team if your Akamai property uses a different rule format or deployment method.

This integration is in Beta. Please report any issues to our support team.

Setup Overview

Setting up the integration requires going through the following steps. This guide will go through each step in detail, but here is the high-level view.

  1. Issue a proxy secret in the Fingerprint dashboard.
  2. Apply Fingerprint property rules and property variables to your Terraform configuration file.
  3. Configure the Fingerprint JavaScript agent on your website.

Step 1: Issue a Fingerprint proxy secret

Issue a Fingerprint proxy secret that you will use to authenticate requests from your Akamai infrastructure.

  1. Go to the Fingerprint dashboard and select your application.
  2. In the left menu, navigate to App Settings > API Keys.
  3. Click Create Proxy Key.
  4. Give it a name, for example, Akamai Proxy Integration.
  5. Click Create API Key.

Store the proxy secret value as you will use it in the following step.

Step 2: Apply Fingerprint property rules and property variables

Adjust your Terraform configuration to incorporate the variable blocks, property rules, and property variables the integration requires.

Step 2.1: Add variable blocks to your rules template

Specify three randomized path values and the Fingerprint proxy secret you created in Step 1:

  • fpjs_integration_path
  • fpjs_agent_path
  • fpjs_result_path
  • fpjs_proxy_secret

Pick any random strings that are valid URL paths for the path values. Be careful not to include words often blocked by ad blockers, such as ”fingerprint” or ”fpjs.” You can use any random value generator or Terraform's Random Provider.

Find the akamai_property_rules_template data block in your Terraform configuration file and add the four variables:

data "akamai_property_rules_template" "rules" {
  # Assuming this is the property's rules file
  template_file = "/rules/main.json"
  variables {
    name  = "fpjs_integration_path"
    value = "YOUR_INTEGRATION_PATH_HERE"
    type = "string"
  }
  variables {
    name  = "fpjs_agent_path"
    value = "YOUR_AGENT_PATH_HERE"
    type = "string"
  }
  variables {
    name  = "fpjs_result_path"
    value = "YOUR_RESULT_PATH_HERE"
    type = "string"
  }
  variables {
    name  = "fpjs_proxy_secret"
    value = "YOUR_PROXY_SECRET_HERE"
    type = "string"
  }
}

Step 2.2: Add Fingerprint property rules

  1. Go to the integration's latest releases on GitHub.
  2. Download the terraform/fingerprint-property-rules.json file.
  3. Add it to your Terraform project's rules directory as fingerprint-property-rules.json.
  4. Reference the file in rules/main.json like below:
// rules/main.json
{
  "rules": {
    "name": "default",
    "behaviors": [
      // ...
    ],
    "children": [
      // ...other rule files
      // Add the downloaded rules file
      "#include:fingerprint-property-rules.json"
    ]
    // ...
  }
}

Step 2.3: Add Fingerprint property variables

  1. Go to the integration's latest releases on GitHub.

  2. Download the terraform/fingerprint-property-variables.json file.

  3. Add it to your Terraform project's rules directory as fingerprint-property-variables.json.

  4. Reference the file in rules/main.json:

    • If you don't have a variables field, add the variables: "#include:fingerprint-property-variables.json" line.
    • If you already have a variables field, merge fingerprint-property-variables.json with your existing variables file.
// rules/main.json
{
  "rules": {
    "name": "default",
    "behaviors": [
      // ...
    ],
    "children": [
      //...
      "#include:fingerprint-property-rules.json"
    ],
    // Add the downloaded variables file (or merge it with the existing variables file)
    "variables": "#include:fingerprint-property-variables.json"
    // ...
  }
}

⚠️ The Akamai property variables and Terraform variable blocks are different. ⚠️

Note that the Akamai property variables added in Step 2.3 differ from the Terraform variable blocks added in Step 2.1.

  • Property rules use property variables, and you cannot change them.
  • You can change the variable block values (randomized paths and the proxy secret) according to your needs.

Step 2.4: Apply Terraform changes

  1. Run terraform plan to review your changes.
  2. Run terraform apply.

After your property deploys, you can access the Fingerprint API through the chosen paths on your website. If you cannot do so now, please contact our support team.

Step 3: Configure the Fingerprint JS agent

Now that you can access the Fingerprint visitor identification APIs through your website with the proxy integration set up, you can update the JS agent on the front end to point to this path.

  1. Use the random path variables created in Step 2.1 to construct the scriptUrlPattern (agent download) and endpoint (identification request) URLs.
  2. Configure the Fingerprint JS Agent on your website accordingly:

NPM package

import * as FingerprintJS from "@fingerprintjs/fingerprintjs-pro";

// Initialize the agent at application startup.
const fpPromise = FingerprintJS.load({
  apiKey: "PUBLIC_API_KEY",
  scriptUrlPattern: [
    "<https://yourwebsite.com/YOUR_INTEGRATION_PATH_HERE/YOUR_AGENT_PATH_HERE?apiKey=><apiKey>&version=<version>&loaderVersion=<loaderVersion>",
    FingerprintJS.defaultScriptUrlPattern, // Fallback to default CDN in case of error
  ],
  endpoint: [
    "<https://yourwebsite.com/YOUR_INTEGRATION_PATH_HERE/YOUR_RESULT_PATH_HERE?region=us>",
    FingerprintJS.defaultEndpoint, // Fallback to default endpoint in case of error
  ],
});

CDN

const url =
  "<https://yourwebsite.com/YOUR_INTEGRATION_PATH_HERE/YOUR_AGENT_PATH_HERE?apiKey=><PUBLIC_API_KEY>";
const fpPromise = import(url).then((FingerprintJS) =>
  FingerprintJS.load({
    endpoint: [
      "<https://yourwebsite.com/YOUR_INTEGRATION_PATH_HERE/YOUR_RESULT_PATH_HERE?region=us>",
      FingerprintJS.defaultEndpoint, // Fallback to default endpoint in case of error
    ],
  })
);

If everything is configured correctly, you should receive the latest Fingerprint client-side script and the identification result through your Akamai integration. If you have any questions, reach out to our support team.

Conclusion

Integrating Akamai and Fingerprint can significantly improve visitor identification accuracy. With this integration, your Akamai property can proxy Fingerprint requests, ensuring that your requests for the JavaScript agent and identification signals avoid potential blockers. Blocked identification requests or signals could mean missing critical data for spotting fraudsters or creating frictionless user experiences. By implementing this integration, you leverage Fingerprint Pro's 99.5% accuracy in visitor identification, securing vital data required to provide secure, smooth online experiences.

For more information, visit our documentation on the Akamai proxy integration or explore our other cloud proxy integrations. If you want to understand how proxy integrations can improve visitor identification accuracy, contact our sales team.

All article tags