CLI commands
The extension provides two console commands for the server-side customer profile sync. Event tracking (views, carts, checkout, purchases, search) and refunds are delivered automatically and do not need a CLI command.
Sync customer profiles
bin/magento mirasvit:mixpanel:sync-profiles
Builds and sends Mixpanel people profiles (name, email, customer group, lifetime value, order count, first/last order dates) for all customers who have been identified on the storefront. A profile is only re-sent when its data has actually changed since the last sync, so repeated runs are cheap.
Sync a single customer with the --customer-id option:
bin/magento mirasvit:mixpanel:sync-profiles --customer-id=123
Passing --customer-id syncs that customer even if they were never identified on the storefront - useful for
testing or for back-filling a specific account.
Run cron jobs
bin/magento mirasvit:mixpanel:cron
Runs the extension's scheduled job (Sync All Profiles) immediately, without waiting for the cron schedule. Handy for verifying the profile sync end-to-end.
The profile sync runs automatically every day at 02:00 via the mst_mixpanel_sync_profiles cron job, so
you normally don't need to run these commands by hand.