Permalink
Browse files

Removing session id

  • Loading branch information...
1 parent 338ac74 commit 512bcf5fe902d5ed712529c9755b63a7b0389de5 @calvinfo calvinfo committed Jan 17, 2013
Showing with 3 additions and 11 deletions.
  1. +2 −10 README.md
  2. +1 −1 spec/module_spec.rb
View
@@ -47,16 +47,12 @@ Whenever a user triggers an event, you’ll want to track it.
```ruby
Analytics.identify(
- session_id: 'ajsk2jdj29fj298',
user_id: 'ilya@segment.io',
traits: {subscription_plan: "Free", friends: 30}
)
```
-**session_id** (String) is a unique id associated with an anonymous user **before** they are logged in. Even if the user
-is logged in, you can still send us the **session_id** or you can just use `nil`.
-
-**user_id** (String) is the user's id **after** they are logged in. It's the same id you'd use to identify a signed-in user in your system. Note: you must provide either a `session_id` or a `user_id`.
+**user_id** (String) is the user's id **after** they are logged in. It's the same id you'd use to identify a signed-in user in your system.
**traits** (Hash) is a Hash with keys like `subscriptionPlan` or `favoriteGenre`. This argument is optional, but highly recommended—you’ll find these properties extremely useful later.
@@ -68,17 +64,13 @@ Whenever a user triggers an event on your site, you’ll want to track it so tha
```ruby
Analytics.track(
- session_id: 'skdj2jj2dj2j3i5',
user_id: 'ilya@segment.io',
event: 'Drank some milk',
properties: {fat: 0.02, quantity: '4 gallons'}
)
```
-**session_id** (String) is a unique id associated with an anonymous user **before** they are logged in. Even if the user
-is logged in, you can still send us the **session_id** or you can just use `nil`.
-
-**user_id** (String) is the user's id **after** they are logged in. It's the same id as which you would recognize a signed-in user in your system. Note: you must provide either a `session_id` or a `user_id`.
+**user_id** (String) is the user's id **after** they are logged in. It's the same id as which you would recognize a signed-in user in your system.
**event** (String) describes what this user just did. It's a human readable description like "Played a Song", "Printed a Report" or "Updated Status".
View
@@ -28,7 +28,7 @@
describe '#identify' do
- it 'should error without a user or session' do
+ it 'should error without a user_id' do
expect { Analytics.identify traits: {} }.to raise_error(ArgumentError)
end

0 comments on commit 512bcf5

Please sign in to comment.