{"id":23765814,"url":"https://github.com/solidusio-contrib/solidus_klaviyo","last_synced_at":"2025-09-05T09:33:07.494Z","repository":{"id":49502025,"uuid":"281086422","full_name":"solidusio-contrib/solidus_klaviyo","owner":"solidusio-contrib","description":"Klaviyo integration for the Solidus eCommerce platform.","archived":false,"fork":false,"pushed_at":"2023-07-13T19:56:10.000Z","size":96,"stargazers_count":1,"open_issues_count":2,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-20T14:33:03.148Z","etag":null,"topics":["ecommerce","email","klaviyo","marketing","solidus","tracking"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solidusio-contrib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-20T10:30:20.000Z","updated_at":"2022-08-02T07:17:11.000Z","dependencies_parsed_at":"2022-09-01T20:34:34.851Z","dependency_job_id":null,"html_url":"https://github.com/solidusio-contrib/solidus_klaviyo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_klaviyo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_klaviyo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_klaviyo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_klaviyo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidusio-contrib","download_url":"https://codeload.github.com/solidusio-contrib/solidus_klaviyo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232034914,"owners_count":18463363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecommerce","email","klaviyo","marketing","solidus","tracking"],"created_at":"2024-12-31T23:17:59.993Z","updated_at":"2024-12-31T23:18:00.758Z","avatar_url":"https://github.com/solidusio-contrib.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# solidus_klaviyo\n\n[![CircleCI](https://circleci.com/gh/solidusio-contrib/solidus_klaviyo.svg?style=svg)](https://circleci.com/gh/solidusio-contrib/solidus_klaviyo)\n\nThis extension allows you to integrate your [Solidus](https://solidus.io) store with\n[Klaviyo](https://klaviyo.com) via [solidus_tracking](https://github.com/solidusio-contrib/solidus_tracking).\n\n## Installation\n\nAdd solidus_tracking and solidus_klaviyo to your Gemfile:\n\n```ruby\ngem 'solidus_tracking', github: 'solidusio-contrib/solidus_tracking'\ngem 'solidus_klaviyo', github: 'solidusio-contrib/solidus_klaviyo'\n```\n\nBundle your dependencies and run the installation generator:\n\n```console\n$ bundle\n$ bundle exec rails g solidus_klaviyo:install\n```\n\nThe generator will create an initializer at `config/initializers/solidus_klaviyo.rb` with the\ndefault configuration. Take a look at the file and customize it to fit your environment.\n\n\n## Usage\n\n### Tracking standard events\n\nIn order to track all standard events in Klaviyo, add the following to your\n[solidus_tracking](https://github.com/solidusio-contrib/solidus_tracking) configuration:\n\n```ruby\nSolidusTracking.configure do |config|\n  config.trackers \u003c\u003c SolidusKlaviyo::Tracker.from_config\nend\n```\n\nThat's it! Your events will be automatically sent to Klaviyo.\n\n### Subscribing users to lists\n\nIf you want to subscribe a user to a Klaviyo list, the extension provides a handy Ruby API to do\nthat:\n\n```ruby\nSolidusKlaviyo.subscribe_now('YOUR_LIST_ID', 'jdoe@example.com', custom_property: 'value') \n```\n\nWe recommend using the built-in background job to subscribe users, in order to avoid blocking your\nweb workers and slowing down the customer:\n\n```ruby\nSolidusKlaviyo.subscribe_later('YOUR_LIST_ID', 'jdoe@example.com', custom_property: 'value')\n```\n\n#### Subscribing all users upon signup\n\nIf you want to subscribe all users when they sign up, you can just set the `default_list`\nconfiguration option:\n\n```ruby\n# config/initializers/solidus_klaviyo.rb\nSolidusKlaviyo.configure do |config|\n  # ...\n  config.default_list = 'klaviyoListId'\nend\n``` \n\nNow, all users will be subscribed to the configured list automatically when their account is\ncreated.\n\n### Updating users on your lists\n\nUpdating an existing user on a list is just as easy as adding them.\n\n```ruby\nSolidusKlaviyo.update_now('YOUR_LIST_ID', 'jdoe@example.com', custom_property: 'value') \n```\n\nJust like with subscribing, we recommend using the built-in background job to update users,\nin order to avoid blocking your web workers and slowing down the customer:\n\n```ruby\nSolidusKlaviyo.update_later('YOUR_LIST_ID', 'jdoe@example.com', custom_property: 'value')\n```\n\nUpdating in bulk is also possible using the `bulk_update_now` and `bulk_update_later` methods.\nFor bulk updates, you'll want to provide the emails and custom properties in a single object,\nlike so:\n\n```ruby\nSolidusKlaviyo.bulk_update_later('YOUR_LIST_ID', [{email: 'jdoe@example.com', custom_property: 'value'}])\n```\n\n## Development\n\n### Testing the extension\n\nFirst bundle your dependencies, then run `bin/rake`. `bin/rake` will default to building the dummy\napp if it does not exist, then it will run specs. The dummy app can be regenerated by using\n`bin/rake extension:test_app`.\n\n```console\n$ bundle\n$ bin/rake\n```\n\nTo run [Rubocop](https://github.com/bbatsov/rubocop) static code analysis run\n\n```console\n$ bundle exec rubocop\n```\n\nWhen testing your application's integration with this extension you may use its factories.\nSimply add this require statement to your spec_helper:\n\n```ruby\nrequire 'solidus_klaviyo/factories'\n```\n\n### Running the sandbox\n\nTo run this extension in a sandboxed Solidus application, you can run `bin/sandbox`. The path for\nthe sandbox app is `./sandbox` and `bin/rails` will forward any Rails commands to\n`sandbox/bin/rails`.\n\nHere's an example:\n\n```console\n$ bin/rails server\n=\u003e Booting Puma\n=\u003e Rails 6.0.2.1 application starting in development\n* Listening on tcp://127.0.0.1:3000\nUse Ctrl-C to stop\n```\n\n### Releasing new versions\n\nYour new extension version can be released using `gem-release` like this:\n\n```console\n$ bundle exec gem bump -v VERSION --tag --push --remote upstream \u0026\u0026 gem release\n```\n\n## License\n\nCopyright (c) 2020 Nebulab Srls, released under the New BSD License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidusio-contrib%2Fsolidus_klaviyo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidusio-contrib%2Fsolidus_klaviyo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidusio-contrib%2Fsolidus_klaviyo/lists"}