importing-push-tokens
БесплатноБез исполняемых скриптовНе проверенMove existing mobile push devices from another platform (OneSignal, Braze, Customer.io, Airship, or your own Firebase backend) into a PostHog workflows push…
от PostHog★ 81 звезда на GitHubОб этом скилле
Importing push tokens from another platform
A push notification reaches a device only when PostHog knows that device's token and which person it belongs to. The mobile SDK registers new devices by itself. Devices that installed the app before the switch stay unknown until their token is imported.
The import pairs each device token with a distinct ID.
The distinct ID has to be the ID the app passes to identify, so the device lands on the person a workflow targets.
A pairing that is off by one prefix or uses another platform's internal ID imports fine but never receives a push. Getting the pairing right is most of the job.
The tools
integrations-list: find the push channel.kindisapnsfor iOS andfirebasefor Android (and for iOS apps that send through FCM).integrations-push-tokens-create: import up to 1000 rows per call, withdry_runto check without storing anything.
The same import is in the app under Workflows → Channels → Import devices, for a person who has a CSV.
Which token goes to which channel
| Channel kind | Token it takes | Looks like |
|---|---|---|
apns |
The APNs device token, hex encoded | 64 hex characters, for example 9f2c…e1a0 |
firebase |
The FCM registration token | Around 150 characters of letters, digits, -, _, often with a : |
- Expo tokens (
ExponentPushToken[...]) can't be imported. They address Expo's own push service, not Apple or Google. Ask for the native APNs or FCM token instead: Expo apps can read it withgetDevicePushTokenAsync, so the app has to start sending it to PostHog first. - An iOS app that sends through Firebase has FCM tokens, so those go to the
firebasechannel, notapns. - A row with the wrong kind of token fails as
token_mismatch. The check rejects only shapes that cannot work, so passing it does not prove the token is live.
Workflow
- Find the channel. Call
integrations-listand pick theapnsorfirebaseentry for the app. If there is none, the push channel has to be set up first. - Export devices from the old platform. You need, for each device: its token, its platform, and the old platform's user ID. See references/exporting-devices.md.
- Map the user ID to the PostHog distinct ID. Usually the old platform's external ID is the same value the app passes to PostHog's
identify. Confirm it with the user, because some apps prefix IDs or identify by email in one tool and by database ID in the other. Drop devices with no user ID: an anonymous device has no person to land on. - Dry run a sample. Send 50 to 100 rows with
dry_run: true. Readfailed:- Many
unknown_personrows mean the mapping is wrong. Stop and fix the mapping. Don't switch oncreate_missing_personsto make them pass, because that creates people nobody's app identifies. token_mismatchrows are on the wrong channel or are Expo tokens. Split iOS and Android rows, and drop Expo tokens.
- Many
- Dry run everything, then import. Send the whole set with
dry_run: truein batches of 1000, then again without it. Keep to 60 calls per minute per project. On HTTP 429, wait a minute and send the same batch again. - Handle what is left.
not_storedandperson_processing_disabledrows were not saved by ingestion. Sendnot_storedrows again later. Usecreate_missing_persons: trueonly forunknown_personrows the user confirms are real people who haven't opened the new app yet. - Check one person. Look up one imported person and confirm they have a
$device_push_subscription_<app>:<hash>property. A test push from a workflow to that person is the real proof.
Importing the same row twice stores it once, so a batch can be sent again safely. Each stored device is one event, so a large import counts toward event usage.
Установить importing-push-tokens в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл importing-push-tokens?
Move existing mobile push devices from another platform (OneSignal, Braze, Customer.io, Airship, or your own Firebase backend) into a PostHog workflows push channel, so people who installed the app before the switch still get push notifications. Covers exporting device tokens and user IDs, mapping the old user ID to the PostHog distinct ID, checking the pairing with a dry run, and importing in batches. Use when asked to import, migrate, or backfill push tokens, device tokens, FCM tokens, APNs tokens, or push subscribers.
Как установить скилл importing-push-tokens?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл importing-push-tokens запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic