Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.
/ analytics-clj Public archive
forked from ardoq/analytics-clj

Idiomatic Clojure wrapper for the Segment.io java api

License

Notifications You must be signed in to change notification settings

FarmLogs/analytics-clj

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

analytics-clj

Idiomatic Clojure wrapper for the Segment.io Java API.

API

See Segment.io Java library for more info.

##Artifacts

Artifacts are released to clojars.

If you are using Maven, add the following repository definition to your pom.xml:

<repository>
  <id>clojars.org</id>
  <url>http://clojars.org/repo</url>
</repository>

##Installation

With Leiningen:

[analytics-clj "0.1.2"]

With Maven:

<dependency>
  <groupId>analytics-clj</groupId>
  <artifactId>analytics-clj</artifactId>
  <version>0.1.2</version>
</dependency>

Usage

ardoq.analytics-clj> (def client (initialize "<secret>"))

ardoq.analytics-clj> (identify client "user-id" {:email "test@example.org"})

ardoq.analytics-clj> (track client "user-id" "Logged in" {:plan {:type "trial" :started (DateTime.)}})

;;You can also use options like :contet, timestamp and a callback function. See api for details
ardoq.analytics-clj> (track client "user-id" "Played song" {:title "My title"} 
                         {:context {:ip "10.0.0.1"} 
                          :callback (fn [s m] (println "\n\nDONE!"))})

ardoq.analytics-clj> (make-alias client "user-id" "real-id")

About

Idiomatic Clojure wrapper for the Segment.io java api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published