{"id":19140069,"url":"https://github.com/circleci/analytics-clj","last_synced_at":"2025-04-05T06:08:21.454Z","repository":{"id":57713379,"uuid":"78775891","full_name":"circleci/analytics-clj","owner":"circleci","description":"Idiomatic Clojure wrapper for the Segment.io 2.x Java client","archived":false,"fork":false,"pushed_at":"2025-02-20T19:40:15.000Z","size":267,"stargazers_count":21,"open_issues_count":3,"forks_count":14,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-03-29T05:09:12.740Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/circleci.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-12T18:44:15.000Z","updated_at":"2025-02-20T19:39:59.000Z","dependencies_parsed_at":"2024-03-22T10:55:34.179Z","dependency_job_id":"83142c02-4f7f-427f-9aab-716a5abd13f6","html_url":"https://github.com/circleci/analytics-clj","commit_stats":{"total_commits":135,"total_committers":6,"mean_commits":22.5,"dds":"0.051851851851851816","last_synced_commit":"8875f16747c34d7366596c40b2b21dd9ee9e80b5"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circleci%2Fanalytics-clj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circleci%2Fanalytics-clj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circleci%2Fanalytics-clj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circleci%2Fanalytics-clj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circleci","download_url":"https://codeload.github.com/circleci/analytics-clj/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294539,"owners_count":20915340,"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":[],"created_at":"2024-11-09T07:16:09.379Z","updated_at":"2025-04-05T06:08:21.436Z","avatar_url":"https://github.com/circleci.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# analytics-clj\n\nIdiomatic Clojure wrapper for the Segment.io 2.x Java client\n\nFor full documentation on the Segment.io 2.x Java client, see [analytics-java](https://github.com/segmentio/analytics-java).\n\n## Build Status\n\n[![CircleCI](https://circleci.com/gh/circleci/analytics-clj/tree/master.svg?style=svg)](https://circleci.com/gh/circleci/analytics-clj/tree/master)\n\n## Installation\n\n`[circleci/analytics-clj \"\u003cVERSION\u003e\"]`\n\nTo find the most recent published version, see https://clojars.org/circleci/analytics-clj\n\n## Usage\n\nView the full [API](https://circleci.github.io/analytics-clj/).\n\n### Initialize an analytics client\n\n```\n(use '[circleci.analytics-clj.core])\n(def analytics (initialize \"\u003cwriteKey\u003e\"))\n```\n\nWith logging:\n\n```\n(defn logger []\n  (reify com.segment.analytics.Log\n    (print [this level format args]\n      (println (str (java.util.Date.) \"\\t\" level \"\\t\" args)))\n    (print [this level error format args]\n      (println error))))\n\n(def analytics (initialize \"\u003cwriteKey\u003e\" {:log (logger)}))\n```\n\n### Messages\n\nAll of the message types can take `options`. See [Spec: Common Fields](https://segment.com/docs/spec/common/) for a list of common fields between all message types.\n\n#### Identify\n\n`(identify analytics \"user-id\")`\n\nWith traits:\n\n`(identify analytics \"user-id\" {:email \"bob@acme.com\"})`\n\n#### Track\n\n`(track analytics \"user-id\" \"signup\")`\n\nWith properties:\n\n`(track analytics \"user-id\" \"signup\" {:company \"Acme Inc.\"})`\n\nA full example:\n\n```\n(track analytics (:id user) \"signup\" {:company \"Acme Inc.\"} {:context {:language \"en-us\"}\n                                                             :integrations {\"AdRoll\" false}\n                                                             :integration-options {\"Amplitude\" {:session-id (:id session)}}})\n```\n\n#### Screen\n\n`(screen analytics \"1234\" \"Login Screen\")`\n\nWith properties:\n\n`(screen analytics \"1234\" \"Login Screen\" {:path \"/users/login\"})`\n\n#### Page\n\n`(page analytics \"1234\" \"Login Page\")`\n\nWith properties:\n\n`(page analytics \"1234\" \"Login Page\" {:path \"/users/login\"})`\n\n#### Group\n\n`(group analytics \"1234\" \"group-5678\")`\n\nWith traits:\n\n`(group analytics \"1234\" \"group-5678\" {:name \"Segment\"})`\n\n#### Alias\n\n`(alias analytics \"anonymous_user\" \"5678\")`\n\n### Did we miss something?\n\nWe provided a top level `enqueue` function to allow you to do the following:\n\n```\n(enqueue analytics (doto (YourMessageType/builder)\n                         (.userId \"user-id\")\n                         (.properties {\"company\" \"Acme Inc.\"})))\n```\n\n\n## Releasing\n\nNew git tags are automatically published to [clojars](https://clojars.org/circleci/bond).\n\nThe following should be updated on the main/master branch before tagging:\n\n- `project.clj` - version\n- `CHANGELOG.md` - summary of changes\n\n## License\n\nCopyright © 2019 CircleCI\n\nDistributed under the Eclipse Public License either version 1.0 or (at your option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircleci%2Fanalytics-clj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcircleci%2Fanalytics-clj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircleci%2Fanalytics-clj/lists"}