rudder_analytics_sync 1.0.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +6 -0
- data/.github/pull_request_template.md +3 -0
- data/.github/workflows/build-and-quality-checks.yml +31 -0
- data/.github/workflows/check-pr-title.yml +16 -0
- data/.github/workflows/notion-pr-sync.yml +55 -0
- data/.github/workflows/slack-notify.yml +41 -0
- data/.gitignore +4 -1
- data/.hound.yml +1 -1
- data/.rubocop.yml +30 -4
- data/CODEOWNERS +1 -0
- data/Gemfile +2 -1
- data/LICENSE.txt +1 -1
- data/README.md +74 -23
- data/SECURITY.md +19 -0
- data/bin/console +1 -1
- data/example/example.rb +151 -41
- data/lib/rudder_analytics_sync/batch.rb +20 -6
- data/lib/rudder_analytics_sync/client.rb +18 -0
- data/lib/rudder_analytics_sync/configuration.rb +2 -2
- data/lib/rudder_analytics_sync/constants.rb +21 -0
- data/lib/rudder_analytics_sync/logging.rb +1 -1
- data/lib/rudder_analytics_sync/operations/alias.rb +8 -1
- data/lib/rudder_analytics_sync/operations/group.rb +8 -1
- data/lib/rudder_analytics_sync/operations/identify.rb +15 -5
- data/lib/rudder_analytics_sync/operations/operation.rb +31 -34
- data/lib/rudder_analytics_sync/operations/page.rb +8 -1
- data/lib/rudder_analytics_sync/operations/screen.rb +9 -2
- data/lib/rudder_analytics_sync/operations/track.rb +13 -5
- data/lib/rudder_analytics_sync/request.rb +21 -10
- data/lib/rudder_analytics_sync/utils.rb +26 -22
- data/lib/rudder_analytics_sync/version.rb +1 -1
- data/rudder_analytics_sync.gemspec +5 -2
- metadata +18 -11
- data/.travis.yml +0 -6
- data/CHANGELOG.md +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fb211e617c13d145525cadb6d595b2685ac6cb6344cbb24f68770c3b0dc1ad9b
|
4
|
+
data.tar.gz: 18f1e329449195fe5547fe385d7a9b029bd412f8c9c7c2eb7c21bd9a15f516ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e4a3abb0d9b46a5808ac8e56ce3af55e275dea61bac56ef029e04fb26fcd0b1dbfd5a4ac1206829e31c724476ec89e277bf67bc179590dd7800dfc3bcc5953c
|
7
|
+
data.tar.gz: dc207499b0f313f0ab6442766070875e7855500d03f662e199a25bf65464439021fcef32b8611309ca63a6f315048fb1e418372d3c74c1891e935869ecb37321
|
@@ -0,0 +1,31 @@
|
|
1
|
+
name: Code Quality Checks
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
branches: ['master']
|
5
|
+
types: ['opened', 'reopened', 'synchronize']
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v3
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: '2.7'
|
17
|
+
bundler-cache: true
|
18
|
+
- name: Install dependencies
|
19
|
+
run: bundle install
|
20
|
+
- name: Run tests
|
21
|
+
run: bundle exec rake
|
22
|
+
# - name: Install rubocop
|
23
|
+
# run: gem install rubocop
|
24
|
+
# - name: Install rubocop-rspec
|
25
|
+
# run: gem install rubocop-rspec
|
26
|
+
# - name: Install rubocop-performance
|
27
|
+
# run: gem install rubocop-performance
|
28
|
+
# - name: Install rubocop-rails
|
29
|
+
# run: gem install rubocop-rails
|
30
|
+
# - name: Execute linting
|
31
|
+
# run: bundle exec rubocop
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name: Check PR title
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
branches: ['master']
|
5
|
+
types: ['opened', 'reopened', 'edited', 'synchronize']
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
check_pr_title:
|
9
|
+
name: Check PR title
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- name: Checkout source branch
|
13
|
+
uses: actions/checkout@v3
|
14
|
+
|
15
|
+
- name: Check PR title
|
16
|
+
uses: rudderlabs/github-action-check-pr-title@v1.0.7
|
@@ -0,0 +1,55 @@
|
|
1
|
+
name: Notion PR Sync
|
2
|
+
|
3
|
+
on:
|
4
|
+
issues:
|
5
|
+
types:
|
6
|
+
[
|
7
|
+
opened,
|
8
|
+
edited,
|
9
|
+
deleted,
|
10
|
+
transferred,
|
11
|
+
pinned,
|
12
|
+
unpinned,
|
13
|
+
closed,
|
14
|
+
reopened,
|
15
|
+
assigned,
|
16
|
+
unassigned,
|
17
|
+
labeled,
|
18
|
+
unlabeled,
|
19
|
+
locked,
|
20
|
+
unlocked,
|
21
|
+
milestoned,
|
22
|
+
demilestoned,
|
23
|
+
]
|
24
|
+
pull_request:
|
25
|
+
types:
|
26
|
+
[
|
27
|
+
assigned,
|
28
|
+
unassigned,
|
29
|
+
labeled,
|
30
|
+
unlabeled,
|
31
|
+
opened,
|
32
|
+
edited,
|
33
|
+
closed,
|
34
|
+
reopened,
|
35
|
+
synchronize,
|
36
|
+
converted_to_draft,
|
37
|
+
ready_for_review,
|
38
|
+
locked,
|
39
|
+
unlocked,
|
40
|
+
review_requested,
|
41
|
+
review_request_removed,
|
42
|
+
auto_merge_enabled,
|
43
|
+
auto_merge_disabled,
|
44
|
+
]
|
45
|
+
|
46
|
+
jobs:
|
47
|
+
request:
|
48
|
+
runs-on: ubuntu-latest
|
49
|
+
steps:
|
50
|
+
- name: Sync Github PRs to Notion
|
51
|
+
uses: sivashanmukh/github-notion-pr-sync@1.0.0
|
52
|
+
with:
|
53
|
+
notionKey: ${{ secrets.NOTION_BOT_KEY }}
|
54
|
+
notionDatabaseId: ${{ secrets.NOTION_PR_DB_ID }}
|
55
|
+
githubKey: ${{ secrets.PAT }}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
name: Notify Slack Channel
|
2
|
+
|
3
|
+
on:
|
4
|
+
release:
|
5
|
+
types: [created]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
deploy-tag:
|
9
|
+
name: Notify Slack
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- name: Send message to Slack channel
|
13
|
+
id: slack
|
14
|
+
uses: slackapi/slack-github-action@v1.23.0
|
15
|
+
env:
|
16
|
+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
17
|
+
PROJECT_NAME: 'Ruby(Sync) SDK'
|
18
|
+
with:
|
19
|
+
channel-id: "${{ secrets.SLACK_RELEASE_CHANNEL_ID }}"
|
20
|
+
payload: |
|
21
|
+
{
|
22
|
+
"blocks": [
|
23
|
+
{
|
24
|
+
"type": "header",
|
25
|
+
"text": {
|
26
|
+
"type": "plain_text",
|
27
|
+
"text": "New release: ${{ env.PROJECT_NAME }}"
|
28
|
+
}
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"type": "divider"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"type": "section",
|
35
|
+
"text": {
|
36
|
+
"type": "mrkdwn",
|
37
|
+
"text": "*Release: <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}>*"
|
38
|
+
}
|
39
|
+
}
|
40
|
+
]
|
41
|
+
}
|
data/.gitignore
CHANGED
data/.hound.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,12 +1,38 @@
|
|
1
|
+
require: rubocop-rspec
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
NewCops: enable
|
5
|
+
Exclude:
|
6
|
+
- 'spec/**/*'
|
7
|
+
- 'example/**/*'
|
8
|
+
|
1
9
|
Metrics/BlockLength:
|
2
10
|
Exclude:
|
3
|
-
- '
|
11
|
+
- 'spec/**/*'
|
12
|
+
- 'example/**/*'
|
4
13
|
|
5
|
-
|
6
|
-
|
14
|
+
Style/OptionalBooleanParameter:
|
15
|
+
Exclude:
|
16
|
+
- 'spec/**/*'
|
17
|
+
- 'example/**/*'
|
18
|
+
|
19
|
+
Style/FormatStringToken:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Layout/LineLength:
|
23
|
+
Max: 200
|
7
24
|
IgnoreCopDirectives: true
|
8
25
|
Exclude:
|
9
|
-
- '
|
26
|
+
- 'rudder_analytics_sync.gemspec'
|
10
27
|
|
11
28
|
Style/Documentation:
|
12
29
|
Enabled: false
|
30
|
+
|
31
|
+
Gemspec/RequiredRubyVersion:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Metrics/MethodLength:
|
35
|
+
Max: 200
|
36
|
+
|
37
|
+
Style/IfUnlessModifier:
|
38
|
+
Enabled: false
|
data/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @pallabmaiti @bardisg
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,58 +1,108 @@
|
|
1
|
-
|
1
|
+
<p align="center">
|
2
|
+
<a href="https://rudderstack.com/">
|
3
|
+
<img src="https://user-images.githubusercontent.com/59817155/121357083-1c571300-c94f-11eb-8cc7-ce6df13855c9.png">
|
4
|
+
</a>
|
5
|
+
</p>
|
2
6
|
|
3
|
-
|
4
|
-
Rudder is an open-source Segment alternative written in Go, built for the enterprise. .
|
7
|
+
<p align="center"><b>The Customer Data Platform for Developers</b></p>
|
5
8
|
|
6
|
-
|
7
|
-
|
9
|
+
<p align="center">
|
10
|
+
<b>
|
11
|
+
<a href="https://rudderstack.com">Website</a>
|
12
|
+
·
|
13
|
+
<a href="https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-ruby-sdk/">Documentation</a>
|
14
|
+
·
|
15
|
+
<a href="https://rudderstack.com/join-rudderstack-slack-community">Community Slack</a>
|
16
|
+
</b>
|
17
|
+
</p>
|
8
18
|
|
9
|
-
|
19
|
+
<p align="center"><a href="https://rubygems.org/gems/rudder_analytics_sync/"><img src="https://img.shields.io/gem/v/rudder_analytics_sync?style=flat"/></a></p>
|
20
|
+
|
21
|
+
----
|
22
|
+
|
23
|
+
# RudderStack Ruby SDK
|
24
|
+
|
25
|
+
The RudderStack Ruby SDK lets you send customer event data from your Ruby applications to your specified destinations.
|
26
|
+
|
27
|
+
## SDK setup requirements
|
28
|
+
|
29
|
+
- Set up a [RudderStack open source](https://app.rudderstack.com/signup?type=opensource) account.
|
30
|
+
- Set up a Ruby source in the dashboard.
|
31
|
+
- Copy the write key and the data plane URL. For more information, refer to the [Ruby SDK documentation](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-ruby-sdk/#sdk-setup-requirements).
|
10
32
|
|
11
33
|
## Installation
|
12
34
|
|
13
|
-
|
35
|
+
To install the RudderStack Ruby SDK, add this line to your application's Gem file:
|
14
36
|
|
15
37
|
```ruby
|
16
38
|
gem 'rudder_analytics_sync'
|
17
39
|
```
|
18
40
|
|
19
|
-
|
41
|
+
You can also install it yourself by running the following command:
|
20
42
|
|
21
|
-
```
|
22
|
-
|
43
|
+
```bash
|
44
|
+
gem install rudder_analytics_sync
|
23
45
|
```
|
24
46
|
|
25
|
-
##
|
47
|
+
## Using the SDK
|
26
48
|
|
27
|
-
|
49
|
+
To use the Ruby SDK, create a client instance as shown:
|
28
50
|
|
29
51
|
```ruby
|
30
52
|
analytics = RudderAnalyticsSync::Client.new(
|
31
|
-
write_key:
|
32
|
-
data_plane_url:
|
53
|
+
write_key: 'WRITE_KEY', # Required
|
54
|
+
data_plane_url: 'DATA_PLANE_URL',
|
55
|
+
stub: false,
|
56
|
+
gzip: true, # Set to false to disable Gzip compression
|
33
57
|
on_error: proc { |error_code, error_body, exception, response|
|
34
58
|
# defaults to an empty proc
|
35
59
|
}
|
36
60
|
)
|
37
61
|
```
|
38
62
|
|
39
|
-
|
63
|
+
You can then use this client to send the events. A sample `track` call sent using the client is shown below:
|
40
64
|
|
41
65
|
```ruby
|
42
66
|
analytics.track(
|
43
|
-
user_id:
|
44
|
-
event: '
|
67
|
+
user_id: 12345,
|
68
|
+
event: 'Test Event'
|
69
|
+
)
|
70
|
+
```
|
71
|
+
|
72
|
+
## Gzip support
|
73
|
+
|
74
|
+
From version 2.0.0, the Ruby SDK supports Gzip compression and it is enabled (set to `true`) by default. However, you can disable this feature by setting the `Gzip` parameter to `false` while initializing the SDK, as shown:
|
75
|
+
|
76
|
+
```ruby
|
77
|
+
analytics = RudderAnalyticsSync::Client.new(
|
78
|
+
write_key: 'WRITE_KEY', # required
|
79
|
+
data_plane_url: 'DATA_PLANE_URL',
|
80
|
+
stub: false,
|
81
|
+
gzip: false, // Set to true to enable Gzip compression
|
82
|
+
on_error: proc { |error_code, error_body, exception, response|
|
83
|
+
# defaults to an empty proc
|
84
|
+
}
|
45
85
|
)
|
46
86
|
```
|
47
87
|
|
48
|
-
|
88
|
+
| Note: Gzip requires `rudder-server` version 1.4 or later. |
|
89
|
+
| :-----|
|
49
90
|
|
50
|
-
|
91
|
+
## Sending events
|
92
|
+
|
93
|
+
Refer to the [RudderStack Ruby SDK documentation](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-ruby-sdk/) for more information on the supported event types.
|
94
|
+
|
95
|
+
| From version 2.0.0, the Ruby SDK supports [`screen`](https://www.rudderstack.com/docs/event-spec/standard-events/screen/) events. |
|
96
|
+
| :-----|
|
97
|
+
|
98
|
+
### Manually batching events
|
99
|
+
|
100
|
+
You can manually batch your events using `analytics.batch`, as shown:
|
51
101
|
|
52
102
|
```ruby
|
53
103
|
analytics.batch do |batch|
|
54
|
-
batch.context = {...} #
|
55
|
-
batch.integrations = {...} #
|
104
|
+
batch.context = {...} # Shared context for all the events
|
105
|
+
batch.integrations = {...} # Shared integrations hash for all the events
|
56
106
|
batch.identify(...)
|
57
107
|
batch.track(...)
|
58
108
|
batch.track(...)
|
@@ -60,5 +110,6 @@ analytics.batch do |batch|
|
|
60
110
|
end
|
61
111
|
```
|
62
112
|
|
63
|
-
##
|
64
|
-
|
113
|
+
## License
|
114
|
+
|
115
|
+
The RudderStack Ruby SDK is released under the [MIT license](https://github.com/rudderlabs/rudder-sdk-ruby-sync/blob/feat/latest-pull/LICENSE.txt).
|
data/SECURITY.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Security Reporting
|
2
|
+
|
3
|
+
Thank you in advance for helping us keep RudderStack secure!
|
4
|
+
|
5
|
+
Please report any security issues or vulnerabilities to [security@rudderstack.com](mailto:security@rudderstack.com), before proceeding to post them publicly as issues on GitHub or any other public channel like the RudderStack community Slack. These issues might also affect other users, and security vulnerabilities need to be handled quickly and sometimes privately.
|
6
|
+
|
7
|
+
We will triage the issue, contact you for further instructions and make sure to take any necessary measures as needed.
|
8
|
+
|
9
|
+
## Supported versions
|
10
|
+
|
11
|
+
We will fix any security bugs for the latest major.minor version published in the [Docker Hub](https://hub.docker.com/r/rudderlabs/rudder-server).
|
12
|
+
|
13
|
+
| Version | Supported |
|
14
|
+
| :-------| :---------|
|
15
|
+
| Latest 1.x | ✅ |
|
16
|
+
| Older 1.x | ❌ |
|
17
|
+
| < 1.0 | ❌ |
|
18
|
+
|
19
|
+
We may fix the vulnerabilities in the older versions depending on the severity of the issue and the age of the release, but we are only committing to the latest version released.
|
data/bin/console
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
require 'bundler/setup'
|
5
|
-
require '
|
5
|
+
require 'rudder_analytics_sync'
|
6
6
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
data/example/example.rb
CHANGED
@@ -1,53 +1,163 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rudder_analytics_sync'
|
4
|
+
require 'yaml'
|
5
|
+
require 'date'
|
6
|
+
|
7
|
+
def uid
|
8
|
+
arr = SecureRandom.random_bytes(16).unpack('NnnnnN')
|
9
|
+
arr[2] = (arr[2] & 0x0fff) | 0x4000
|
10
|
+
arr[3] = (arr[3] & 0x3fff) | 0x8000
|
11
|
+
'%08x-%04x-%04x-%04x-%04x%08x' % arr
|
12
|
+
end
|
2
13
|
|
3
|
-
|
14
|
+
local_config = YAML.safe_load(File.read('example/local_config.yaml'))
|
15
|
+
|
16
|
+
ENV['WRITE_KEY'] = local_config['WRITE_KEY']
|
17
|
+
ENV['DATA_PLANE_URL'] = local_config['DATA_PLANE_URL']
|
18
|
+
ENV['LOCAL_DATA_PLANE_URL'] = local_config['LOCAL_DATA_PLANE_URL']
|
4
19
|
|
5
20
|
analytics = RudderAnalyticsSync::Client.new(
|
6
|
-
write_key: '
|
7
|
-
data_plane_url: '
|
8
|
-
|
21
|
+
write_key: ENV['WRITE_KEY'], # required
|
22
|
+
data_plane_url: ENV['LOCAL_DATA_PLANE_URL'],
|
23
|
+
# logger: Logger::DEBUG,
|
24
|
+
gzip: false,
|
9
25
|
on_error: proc { |error_code, error_body, exception, response|
|
10
26
|
# defaults to an empty proc
|
11
27
|
}
|
12
28
|
)
|
13
29
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
30
|
+
properties = {
|
31
|
+
library: {
|
32
|
+
application: 'Rudder Desktop',
|
33
|
+
version: '1.1.0',
|
34
|
+
platform: 'osx'
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
traits = {
|
39
|
+
firstname: 'First',
|
40
|
+
lastname: 'Last',
|
41
|
+
Role: 'Jedi',
|
42
|
+
age: 25
|
43
|
+
}
|
44
|
+
|
45
|
+
user_id = '123456'
|
46
|
+
anonymous_id = uid
|
47
|
+
|
48
|
+
context = {
|
49
|
+
screen: {
|
50
|
+
width: 852,
|
51
|
+
height: 393,
|
52
|
+
density: 3
|
53
|
+
},
|
54
|
+
os: {
|
55
|
+
name: 'macOS',
|
56
|
+
version: '2.0.0'
|
57
|
+
},
|
58
|
+
locale: 'en-US'
|
59
|
+
}
|
60
|
+
|
61
|
+
context_with_library = {
|
62
|
+
screen: {
|
63
|
+
width: 852,
|
64
|
+
height: 393,
|
65
|
+
density: 3
|
66
|
+
},
|
67
|
+
os: {
|
68
|
+
name: 'macOS',
|
69
|
+
version: '2.0.0'
|
70
|
+
},
|
71
|
+
locale: 'en-US',
|
72
|
+
library: {
|
73
|
+
name: 'analytics-random-sdk',
|
74
|
+
version: '1.0.0.beta.1'
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
analytics.track(
|
79
|
+
user_id: user_id,
|
80
|
+
event: 'Test Track',
|
81
|
+
anonymous_id: anonymous_id,
|
82
|
+
properties: properties,
|
83
|
+
context: context
|
84
|
+
)
|
85
|
+
|
86
|
+
analytics.screen(
|
87
|
+
user_id: user_id,
|
88
|
+
name: 'Test Screen',
|
89
|
+
anonymous_id: anonymous_id,
|
90
|
+
properties: properties,
|
91
|
+
context: context
|
92
|
+
)
|
93
|
+
|
94
|
+
analytics.identify(
|
95
|
+
user_id: '654321',
|
96
|
+
traits: traits,
|
97
|
+
context: context
|
98
|
+
)
|
99
|
+
|
100
|
+
analytics.group(
|
101
|
+
user_id: user_id,
|
102
|
+
group_id: uid,
|
103
|
+
anonymous_id: anonymous_id,
|
104
|
+
traits: traits,
|
105
|
+
context: context
|
106
|
+
)
|
107
|
+
|
108
|
+
analytics.alias(
|
109
|
+
user_id: user_id,
|
110
|
+
previous_id: '654321',
|
111
|
+
context: context
|
112
|
+
)
|
113
|
+
|
114
|
+
analytics.page(
|
115
|
+
user_id: user_id,
|
116
|
+
name: 'Test Page',
|
117
|
+
anonymous_id: anonymous_id,
|
118
|
+
properties: properties,
|
119
|
+
context: context
|
120
|
+
)
|
18
121
|
|
19
122
|
analytics.batch do |batch|
|
20
|
-
batch.context =
|
123
|
+
batch.context = context_with_library
|
21
124
|
batch.integrations = { All: false, S3: true }
|
22
|
-
|
23
|
-
batch.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
125
|
+
|
126
|
+
batch.track(
|
127
|
+
user_id: user_id,
|
128
|
+
event: 'Test Track',
|
129
|
+
anonymous_id: anonymous_id,
|
130
|
+
properties: properties
|
131
|
+
)
|
132
|
+
|
133
|
+
batch.screen(
|
134
|
+
user_id: user_id,
|
135
|
+
name: 'Test Screen',
|
136
|
+
anonymous_id: anonymous_id,
|
137
|
+
properties: properties
|
138
|
+
)
|
139
|
+
|
140
|
+
batch.identify(
|
141
|
+
user_id: '654321',
|
142
|
+
traits: traits
|
143
|
+
)
|
144
|
+
|
145
|
+
batch.group(
|
146
|
+
user_id: user_id,
|
147
|
+
group_id: uid,
|
148
|
+
anonymous_id: anonymous_id,
|
149
|
+
traits: traits
|
150
|
+
)
|
151
|
+
|
152
|
+
batch.alias(
|
153
|
+
user_id: user_id,
|
154
|
+
previous_id: '654321'
|
155
|
+
)
|
156
|
+
|
157
|
+
batch.page(
|
158
|
+
user_id: user_id,
|
159
|
+
name: 'Test Page',
|
160
|
+
anonymous_id: anonymous_id,
|
161
|
+
properties: properties
|
162
|
+
)
|
163
|
+
end
|