Skip to main content
This migration guide describes how to switch to JavaScript Agent V4 in your Fingerprint CloudFront integration with zero downtime and without the need to update the proxy path used by your JavaScript Agent.
JavaScript agent v3 is deprecated as of October 31, 2026, and stops working on October 31, 2027. Complete this migration before that date. See the v3 deprecation timeline.

Migration overview

Upgrade to v2 firstIf your CloudFront integration is still on v1, follow the migrating CloudFront proxy integration from v1 to v2 guide to upgrade to 2.2.0 (or later) first. Then, return to this guide to finish migrating to JavaScript Agent V4.
  1. Update your CloudFront Integration to the latest version that supports JavaScript Agent V4 (2.2.0 or later) using your preferred deployment method.
  2. Update your CloudFront distribution cache behavior path.
  3. Verify that the updated integration works.
  4. Switch from JavaScript Agent V3 to V4 in your application.
  5. Optionally, remove the JavaScript Agent V3 configuration from your integration.

Step 1: Update your CloudFront Integration’s Lambda function

Follow the update guide for your deployment method: To verify the integration version, check your integration status page available at https://yourwebsite.com/FPJS_BEHAVIOR_PATH/status.

Step 2: Update your CloudFront distribution cache behavior path

Depending on your deployment method, you need to update the cache behavior path in your CloudFront distribution in the following ways:
The latest version of the Lambda function maintains compatibility with your existing CloudFront configuration and JavaScript agent v3, but the following CloudFront configuration change is recommended before upgrading to JavaScript agent v4.

CloudFormation

  1. Head to your CloudFront distribution in the AWS console.
  2. Select the Behaviors tab and edit the fpcdn.io behavior.
  3. Update the Path Pattern from FPJS_BEHAVIOR_PATH/* to FPJS_BEHAVIOR_PATH* (without the trailing slash):
  4. Save the changes.
  5. If your behavior path contains more than one segment (e.g. ore54guier/vbcnkxb654):
    1. Head to the Origins tab and edit the fpcdn.io origin.
    2. Add a custom header:
      • Set Header name to FPJS_INTEGRATION_PATH_DEPTH.
      • Set Value to the number of path segments in the behavior path, in our example it’s 2.
    3. Save the changes.

Terraform

Ensure that you’re using our Terraform Module version v2.0.0 or later.
Keep the V3 path variables until the migration is completeStarting with v2.0.0, the fpjs_agent_download_path and fpjs_get_result_path module variables are optional. The integration only serves JavaScript Agent V3 requests while they are set. Keep both variables in your module configuration until all your clients use JavaScript Agent V4 (see Step 5).
Update your CloudFront distribution cache behavior path_pattern from FPJS_BEHAVIOR_PATH/* to FPJS_BEHAVIOR_PATH* (without the trailing slash)
main.tf
If your behavior path contains more than one segment (e.g. ore54guier/vbcnkxb654), you need to count the number of path segments in the behavior path and add the integration_path_depth parameter with value equal to the number of path segments:
main.tf
Finally, apply the changes:
  1. Run terraform plan to verify the planned configuration changes.
  2. Run terraform apply to apply the changes.

Step 3: Update your application to use the JavaScript Agent V4

At this point, you should have CloudFront integration running that will work with both v3 and v4 JavaScript agents. Try using the integration with the V4 agent. For example:
JavaScript
All requests from the agent should go through your integration and resolve successfully. Confirm by using the Network tab in your browser Developer tools, as the JavaScript agent can fall back to default endpoints in case of an integration error.

Step 4: Switch from JavaScript Agent V3 to V4

At this point, you can start migrating your application to use the new JavaScript Agent V4.
JavaScript

Step 5: Remove the JavaScript Agent V3 configuration (optional)

Once all your clients use JavaScript Agent V4 and no JavaScript Agent V3 traffic reaches your integration, you can remove the V3 configuration. After this step, the integration stops serving JavaScript Agent V3 requests.

Terraform

Remove the fpjs_agent_download_path and fpjs_get_result_path variables from the module configuration:
main.tf
Then apply the changes:
  1. Run terraform plan to verify the planned configuration changes.
  2. Run terraform apply to apply the changes.

What’s next

To learn more, see the JavaScript Agent V4 migration guide.