Last active
July 4, 2024 19:27
-
-
Save ak--47/05d73181bf85d4b47317dee9d16aed4d to your computer and use it in GitHub Desktop.
reload mixpanel data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# reload all EVENTS from one project to another | |
# environment variables | |
# CUSTOMIZE THESE 👇 | |
export START=2023-01-01 | |
export END=2023-05-31 | |
export SOURCE_SECRET=my-source-project-secret | |
export TARGET_SECRET=my-target-project-secret | |
# export → import | |
npx --yes mixpanel-import --type export --start $START --end $END --secret $SOURCE_SECRET && npx --yes mixpanel-import ./mixpanel-exports/ --secret $TARGET_SECRET | |
############################## | |
# reload all USER PROFILES from one project to another | |
# environment variables | |
# CUSTOMIZE THESE 👇 | |
export SOURCE_SECRET=my-source-project-secret | |
export TARGET_SECRET=my-target-project-secret | |
export TARGET_TOKEN=my-target-project-token | |
# export → import | |
npx --yes mixpanel-import --type profile-export --secret $SOURCE_SECRET && npx --yes mixpanel-import ./mixpanel-exports/ --type user --token $TARGET_TOKEN --secret $TARGET_SECRET --fixData --format json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
please note... if either your source OR your target projects are using EU residency, please pass the:
flag to the corresponding project