今日已更新 381 条资讯 | 累计 42058 条内容
关于我们

Skip the manual PostHog setup: EAS wires it into your Expo app for you

Dan 2026年09月11日 20:43 0 次阅读 来源:Dev.to

You know the drill. Sign up for PostHog, create an org, create a project, decide which of the four SDK packages you actually need this time, hook up the config plugin, copy the project key out of one browser tab and paste it into .env.local in another, then repeat that last step for every EAS environment so your team and your CI can see the same data you do. By the time analytics is actually capturing events, you've spent half an hour on plumbing. That setup is now one command. It creates your PostHog org and project, installs the SDK, adds the config plugin, and writes your keys into .env.local and your EAS environment variables for Production, Preview, and Development. You pick the data region and the features you want, and it's done. If you already have a PostHog account, it opens your browser once to link the existing org and project, then runs the same setup against it. That's the news. The more interesting part is what the integration does once it's installed: every PostHog event from your app now carries the release it came from, and your EAS Workflows can read PostHog metrics and decide what happens next. What the integration actually sets up Product analytics tells you what a user did. On its own, it doesn't tell you which build, channel, or update they were running when they did it. That's the gap this integration closes, and it does it with almost no setup on your part. A few lines in your app register eas/update_id , eas/channel , and eas/runtime_version as super properties. Once that's in place, every capture() call carries them automatically. Your workflows speak the same language: the native posthog_capture_event function takes the same eas/ names, filled in from contexts like $${{ app.id }} or job outputs like build_id , so an event fired from CI looks exactly like one fired from a phone in someone's pocket. PostHog recognizes these property names on its own. It shows the Expo logo next to them in the UI and turns the values into links back to your E

本文内容来源于互联网,版权归原作者所有
查看原文