Partner Metrics is an open-source project providing you with metrics of your app, theme and affiliate revenue from the Shopify Partner program. Currently it calculates metrics based on monthly and yearly subscriptions, one-time charges and usage charges from Shopify.
This project is not officially related to Shopify in any way.
Partner Metrics was created by @forsbergplustwo, and will remain free to use at:
The app in this repo was recently upgraded to Rails 7. If you had the earlier version running locally, you can upgrade by performing the following actions on your existing local app:
bin/rails db:migrate
bin/rails db:encryption:init
bin/rails create_initial_imports
bin/rails migrate_partner_api_credentials
Note: We recommend deleting your existing metrics data and re-importing to take advantage of improvements to churn calculations + yearly subscriptions support.
- Setup dependencies, environment & database:
bin/setup
- Start web server and sidekiq workers with:
bin/dev
Visit localhost:4000
To run tests:
bin/rails test
# including system tests
bin/rails test:all
To import data from Partner API manually (once you have added your credentials in the app UI):
bin/rails import_all_from_partner_api
- Delete
config/credentials/production.yml.enc
- Run
bin/rails credentials:edit -e production
and update as necessary - If deploying to Heroku, make sure to set
heroku config:set RAILS_MASTER_KEY=[key]
where[key]
is the value of yourconfig/credentials/production.key
file. - Setup a cron job to run
bin/rails import_all_from_partner_api
on a daily basis.
We'd love for you to contribute join us in making it better! In general, please follow the "fork-and-pull" Git workflow.
- Check out the Issues page, feel free to pick an existing issue or add a new one with clear title and description.
- Fork and clone the repo on GitHub
- Create a new branch for your fix or code improvement
- Run
standardrb --fix
to safely-autofix any linter or formatter corrections - Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that @forsbergplustwo can review your changes. Please link your PR to the existing issue if you are solving one.
We have a handful of MiniTests and Fixtures in the codebase, and welcome more. Please write MiniTests for new code you create.
Everyone interacting in Partner Metrics repository is expected to follow the Code of Conduct.
Partner Metrics is released under the GPLv3 License.