Skip to content

Analytics Error #249

@stanleyowen

Description

@stanleyowen

Description

When creating or editing an Analytics Engine dataset binding via the Cloudflare Dashboard, the binding name is always forced to WAE, even if a custom binding name (e.g. ANALYTICS) is provided.

This makes it impossible to use frameworks or examples that require a specific binding name unless wrangler.toml is used.

Steps to Reproduce

  1. Go to Workers & Pages → Analytics Engine
  2. Create a new dataset (e.g. sink_v2)
  3. Enter a custom binding name such as ANALYTICS
  4. Save the configuration
  5. Copy the generated binding configuration

Expected Behavior

The binding name should match the user-provided value:

{
  "binding": "ANALYTICS",
  "dataset": "sink_v2"
}

Actual Behavior

The binding name is always replaced with WAE:

{
  "binding": "WAE",
  "dataset": "sink_v2"
}

I keep getting the following error even after following #195, any solutions on this?

Image Image

Below is the latest wrangler.jsonc file

{
  "$schema": "node_modules/wrangler/config-schema.json",
  "name": "sink",
  "main": ".output/server/index.mjs",
  "assets": {
    "binding": "ASSETS",
    "directory": ".output/public",
    "html_handling": "drop-trailing-slash"
  },
  "compatibility_date": "2025-05-08",
  "compatibility_flags": [
    "nodejs_compat"
  ],
  "keep_vars": true,
  "upload_source_maps": true,
  "observability": {
    "logs": {
      "enabled": true
    },
    "traces": {
      "enabled": true
    }
  },
  "ai": {
    "binding": "AI",
    "remote": true
  },
  "analytics_engine_datasets": [
    { "binding": "ANALYTICS", "dataset": "sink_v2" }
  ],
  "kv_namespaces": [
    {
      "binding": "KV",
      "preview_id": "ef93d42dc4b34969bab404d2e80f8dd3",
      "id": "754943ae57f94a1ca28762d9705aa38a" // IMPORTANT: Change this to your KV namespace ID
    }
  ],
  "r2_buckets": [
    {
      "binding": "R2",
      "preview_bucket_name": "sink",
      "bucket_name": "sink" // IMPORTANT: Change this to your R2 bucket name, or create one with `wrangler r2 bucket create sink`
    }
  ],
  "triggers": {
    "crons": ["0 0 * * *"] // Run backup task daily at 00:00 UTC
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions