Hello! I'm trying out analytics engine
Hello! I'm trying out analytics engine in my worker. But whatever I do, I always run into the
Cannot read properties of undefined (reading 'writeDataPoint')
error.
It's a Typescript worker, and I'm simply calling env.VIEW_COUNTER.writeDataPoint()
with
in my wrangler.toml
Wrangler correctly identifies env.VIEW_COUNTER
as a analytics engine dataset when generating the types;
Analytics Engine is enabled in CloudFlare. What am I missing?1 Reply
Oh, I just fixed it by changing the config in
wranger.toml
to;
🤔