Cloudflare Docs
Edit this page on GitHub
Set theme to dark (⇧+D)

Version metadata binding


The version metadata binding can be used to access metadata associated with a version from inside the Workers runtime.

Worker version ID and version tag are available through the version metadata binding. They can be used in events sent to Workers Analytics Engine or to any third-party analytics/metrics service in order to aggregate by Worker version.

To use the version metdata binding, ipdate your Worker’s wrangler.toml file:


​​ Interface

An example of how to access the version ID and version tag from within a Worker to send events to Workers Analytics Engine:

export default {
async fetch(request, env, ctx) {
const { versionId } =;
const { versionTag } = env.CF_VERSION_METADATA.tag;
'indexes': [versionId],
'blobs': [versionTag],