{"id":20672060,"url":"https://github.com/workarea-commerce/workarea-segment-analytics","last_synced_at":"2025-08-26T09:05:00.344Z","repository":{"id":56898457,"uuid":"203642179","full_name":"workarea-commerce/workarea-segment-analytics","owner":"workarea-commerce","description":null,"archived":false,"fork":false,"pushed_at":"2020-01-27T14:03:48.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-21T17:37:59.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workarea-commerce.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-21T18:27:56.000Z","updated_at":"2020-01-27T14:03:48.000Z","dependencies_parsed_at":"2022-08-21T02:20:15.899Z","dependency_job_id":null,"html_url":"https://github.com/workarea-commerce/workarea-segment-analytics","commit_stats":null,"previous_names":["workarea-commerce/workarea-segment_analytics"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/workarea-commerce/workarea-segment-analytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Fworkarea-segment-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Fworkarea-segment-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Fworkarea-segment-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Fworkarea-segment-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workarea-commerce","download_url":"https://codeload.github.com/workarea-commerce/workarea-segment-analytics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Fworkarea-segment-analytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272200555,"owners_count":24890816,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-16T20:31:34.659Z","updated_at":"2025-08-26T09:05:00.316Z","avatar_url":"https://github.com/workarea-commerce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Workarea Segment Analytics\n================================================================================\n\nSegment plugin for the Workarea platform.\n\nIntegration with segment https://segment.com/\nAPI docs: https://segment.com/docs/sources/\n\nThis plugin implements segment's client side tracking API via their `analytics.js` script. Before installing and configuring this plugin you should set up \u0026 configure your segment account with a Website / Javascript source.\n\nGetting Started\n--------------------------------------------------------------------------------\n\nAdd the gem to your application's Gemfile:\n\n```ruby\n# ...\ngem 'workarea-segment-analytics'\n# ...\n```\n\nUpdate your application's bundle.\n\n```bash\ncd path/to/application\nbundle\n```\n\nConfiguration\n--------------------------------------------------------------------------------\n\nTo configure segment in your application you must add the segment write key to your application secrets.\nYou can find the write key by logging in to the segment admin and visiting this URL https://segment.com/weblinc/sources/javascript/settings/keys\n\n    segment_analytics:\n      write_key: alongstringgoeshere\n\nYou will also need to update your application views to include an additional analytics payload for checkout started. To do this add the checkoutStarted event \u0026 payload to any links to checkout_path, for example in your cart/show.html.haml view.\n\nsnippet to add:\n\n```ruby\ndata: { analytics:  checkout_started_analytics_data(@cart).to_json\n```\n\nCompatability with other plugins\n--------------------------------------------------------------------------------\n\nIf you are using the workarea-share plugin you should also add the following to your share links in workarea/storefront/shares/\\_share_buttons.html.haml\n\n```ruby\ndata: { analytics: share_analytics_data('*share service name goes here*', share_url, message).to_json }\n```\n\nexample:\n\n```ruby\ndata: { analytics: share_analytics_data('facebook', share_url, message).to_json }\n```\n\nTesting and debugging\n--------------------------------------------------------------------------------\nTo confirm this plugin is functioning you should check the JS console in development mode, the adapter for this plugin includes a logger which should show multiple console logs in your browser's JS console. All segment logger events begin with 'Segment:'\n\nOnce you have verified there are events firing in the console you should confirm that the data received by segment is error-free. Segment provide an excellent debugger via their admin console, log in and visit this URL: https://segment.com/weblinc/sources/javascript/debugger\n\nWorkarea Commerce Documentation\n--------------------------------------------------------------------------------\n\nSee [https://developer.workarea.com](https://developer.workarea.com) for Workarea Commerce documentation.\n\nLicense\n--------------------------------------------------------------------------------\n\nWorkarea Segment Analytics is released under the [Business Software License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkarea-commerce%2Fworkarea-segment-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkarea-commerce%2Fworkarea-segment-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkarea-commerce%2Fworkarea-segment-analytics/lists"}