https://github.com/subomi/actor_sync
Easily synchronize actor information to CRMs & third-party systems e.g. Mixpanel, Mailchimp etc.
https://github.com/subomi/actor_sync
mixpanel ruby ruby-on-rails third-party
Last synced: 2 months ago
JSON representation
Easily synchronize actor information to CRMs & third-party systems e.g. Mixpanel, Mailchimp etc.
- Host: GitHub
- URL: https://github.com/subomi/actor_sync
- Owner: subomi
- License: mit
- Created: 2020-11-30T14:36:45.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-04T12:09:09.000Z (about 5 years ago)
- Last Synced: 2026-04-03T00:39:26.331Z (3 months ago)
- Topics: mixpanel, ruby, ruby-on-rails, third-party
- Language: Ruby
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Actor Sync
Automatically synchronise actor information to your third party systems e.g. Mixpanel, Sendgrid, Segment etc. I currently use this in production on [Frain](https://frain.dev).
## Getting Started
`config/initializers/actor_sync.rb`
```ruby
ActorSync.configure do |config|
config.sync = true
config.mixpanel = { project_token: '' }
config.mailchimp = { api_key: '' }
end
```
`app/models/user.rb`
```ruby
class User < ApplicationRecord
include ActorSync
actor_sync :mixpanel
actor_sync :mailchimp, audience: monthly_mailing_lists
def data_to_export_to_mixpanel
{
'$first_name': profile.first_name,
'$last_name': profile.last_name,
'$email': email
}
end
end
```
`app/models/company.rb`
```ruby
class Company < ApplicationRecord
include ActorSync
actor_sync :mixpanel, group: true
def data_to_export_to_mixpanel
{
'$name': name,
'products': products_count
}
end
end
```
# TODO
- Write more tests.
- Add Instrumentation
- Add support for other activejob backends - Resque etc.
- Add support for NoSQL Databases
- Add support for Sinatra (Non-Rails environment)
- More documentation
- Add rake tasks to manually sync data
- Add support for mixpanel lookup tables