SegmentAnalytics.jl

Client for Segment.io
Author LarsWl
Popularity
0 Stars
Updated Last
9 Months Ago
Started In
March 2023

SegmentAnalytics.jl

Implementation of segment analytics library inspired by analytics-ruby. For more information, you can read the Segment documentation

Installation

]add SegmentAnalytics

Getting Started

To use SegmentAnalytics, you must initialize the Analytics structure using your write key and custom settings, if necessary. You must then call the required method associated with the Segment API method. Currently, only the track() method is available.

Example

using SegmentAnalytics

analytics = SegmentAnalytics.Analytics(write_key="write_key")
payload = Dict(
  :event => "Event Name",
  :user_id => "User ID",
  :properties => Dict(:p1 => 1, :p2 => 2),
  :message_id => "custom-message-id"
)

track(analytics, payload)

It's recommended to use Symbol keys when it's possible for performance improvement.

Used By Packages

No packages found.