oursprivacy-ingest 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/lib/oursprivacy_ingest/models/batch_create_params.rb +14 -13
- data/lib/oursprivacy_ingest/models/track_event_params.rb +14 -13
- data/lib/oursprivacy_ingest/models/visitor_upsert_params.rb +14 -13
- data/lib/oursprivacy_ingest/resources/track.rb +14 -11
- data/lib/oursprivacy_ingest/resources/visitor.rb +12 -9
- data/lib/oursprivacy_ingest/version.rb +1 -1
- data/rbi/oursprivacy_ingest/models/batch_create_params.rbi +24 -22
- data/rbi/oursprivacy_ingest/models/track_event_params.rbi +24 -22
- data/rbi/oursprivacy_ingest/models/visitor_upsert_params.rbi +24 -22
- data/rbi/oursprivacy_ingest/resources/track.rbi +24 -20
- data/rbi/oursprivacy_ingest/resources/visitor.rbi +22 -18
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 339521757ce7143715d8ba15b4bd6ca9e58b4af951d2093b0b069ee0f28aee31
|
|
4
|
+
data.tar.gz: 56b08685191af7d24663f35cf4769d5bc1910ef7eabd98b88e6d7340d126d159
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5d59c9d1ff7a93201ad6e1afb93ee9f12e008803887d4b7988077ce57c58a2f8c7ffea47839469e57c77f0a81bbafcc68150818da3c37687db6f8118d26b206
|
|
7
|
+
data.tar.gz: e22017a3346aab0c6b497b93cc3e1da611d2f23134f9367cdbdeb235c30ae610d6b8626d3ad13bcf1f1ecf6fe46287af4962cae46baa3ddfab7190807b080e26
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.20.0 (2026-09-23)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.19.0...v1.20.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v1.19.0...v1.20.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** API update.
|
|
3
10
|
## 1.19.0 (2026-09-14)
|
|
4
11
|
|
|
5
12
|
Full Changelog: [v1.18.0...v1.19.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v1.18.0...v1.19.0)
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
15
15
|
<!-- x-release-please-start-version -->
|
|
16
16
|
|
|
17
17
|
```ruby
|
|
18
|
-
gem "oursprivacy-ingest", "~> 1.
|
|
18
|
+
gem "oursprivacy-ingest", "~> 1.20.0"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
<!-- x-release-please-end -->
|
|
@@ -55,9 +55,10 @@ module OursprivacyIngest
|
|
|
55
55
|
nil?: true
|
|
56
56
|
|
|
57
57
|
# @!attribute email
|
|
58
|
-
# The email address of a user.
|
|
59
|
-
#
|
|
60
|
-
#
|
|
58
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
59
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
60
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
61
|
+
# visitor.
|
|
61
62
|
#
|
|
62
63
|
# @return [String, nil]
|
|
63
64
|
optional :email, String, nil?: true
|
|
@@ -72,11 +73,11 @@ module OursprivacyIngest
|
|
|
72
73
|
nil?: true
|
|
73
74
|
|
|
74
75
|
# @!attribute external_id
|
|
75
|
-
# Your system's unique identifier for this user.
|
|
76
|
-
# existing visitor with this externalId
|
|
77
|
-
#
|
|
78
|
-
#
|
|
79
|
-
#
|
|
76
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
77
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
78
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
79
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
80
|
+
# removes the lookup round-trip.
|
|
80
81
|
#
|
|
81
82
|
# @return [String, nil]
|
|
82
83
|
optional :external_id, String, api_name: :externalId, nil?: true
|
|
@@ -101,9 +102,9 @@ module OursprivacyIngest
|
|
|
101
102
|
|
|
102
103
|
# @!attribute user_id
|
|
103
104
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
104
|
-
# When present, this is used directly — no lookup by externalId or
|
|
105
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
106
|
-
# is attached to the right visitor without any lookup overhead.
|
|
105
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
106
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
107
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
107
108
|
#
|
|
108
109
|
# @return [String, nil]
|
|
109
110
|
optional :user_id, String, api_name: :userId, nil?: true
|
|
@@ -128,11 +129,11 @@ module OursprivacyIngest
|
|
|
128
129
|
#
|
|
129
130
|
# @param default_properties [OursprivacyIngest::Models::BatchCreateParams::Event::DefaultProperties, nil] These properties are used throughout the Ours app to pass known values onto dest
|
|
130
131
|
#
|
|
131
|
-
# @param email [String, nil] The email address of a user.
|
|
132
|
+
# @param email [String, nil] The email address of a user. When userId is absent and externalId does not resol
|
|
132
133
|
#
|
|
133
134
|
# @param event_properties [Hash{Symbol=>String, nil}, nil] Any additional event properties you want to pass along.
|
|
134
135
|
#
|
|
135
|
-
# @param external_id [String, nil] Your system's unique identifier for this user.
|
|
136
|
+
# @param external_id [String, nil] Your system's unique identifier for this user. When userId is absent, we search
|
|
136
137
|
#
|
|
137
138
|
# @param identity_context [OursprivacyIngest::Models::BatchCreateParams::Event::IdentityContext, nil] End-user network context for server-side calls. Required for probabilistic ident
|
|
138
139
|
#
|
|
@@ -40,9 +40,10 @@ module OursprivacyIngest
|
|
|
40
40
|
optional :distinct_id, String, api_name: :distinctId, nil?: true
|
|
41
41
|
|
|
42
42
|
# @!attribute email
|
|
43
|
-
# The email address of a user.
|
|
44
|
-
#
|
|
45
|
-
#
|
|
43
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
44
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
45
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
46
|
+
# visitor.
|
|
46
47
|
#
|
|
47
48
|
# @return [String, nil]
|
|
48
49
|
optional :email, String, nil?: true
|
|
@@ -57,11 +58,11 @@ module OursprivacyIngest
|
|
|
57
58
|
nil?: true
|
|
58
59
|
|
|
59
60
|
# @!attribute external_id
|
|
60
|
-
# Your system's unique identifier for this user.
|
|
61
|
-
# existing visitor with this externalId
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
#
|
|
61
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
62
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
63
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
64
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
65
|
+
# removes the lookup round-trip.
|
|
65
66
|
#
|
|
66
67
|
# @return [String, nil]
|
|
67
68
|
optional :external_id, String, api_name: :externalId, nil?: true
|
|
@@ -86,9 +87,9 @@ module OursprivacyIngest
|
|
|
86
87
|
|
|
87
88
|
# @!attribute user_id
|
|
88
89
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
89
|
-
# When present, this is used directly — no lookup by externalId or
|
|
90
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
91
|
-
# is attached to the right visitor without any lookup overhead.
|
|
90
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
91
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
92
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
92
93
|
#
|
|
93
94
|
# @return [String, nil]
|
|
94
95
|
optional :user_id, String, api_name: :userId, nil?: true
|
|
@@ -115,11 +116,11 @@ module OursprivacyIngest
|
|
|
115
116
|
#
|
|
116
117
|
# @param distinct_id [String, nil] A unique identifier for this event used for deduplication. Highly recommended —
|
|
117
118
|
#
|
|
118
|
-
# @param email [String, nil] The email address of a user.
|
|
119
|
+
# @param email [String, nil] The email address of a user. When userId is absent and externalId does not resol
|
|
119
120
|
#
|
|
120
121
|
# @param event_properties [Hash{Symbol=>String, nil}, nil] Any additional event properties you want to pass along.
|
|
121
122
|
#
|
|
122
|
-
# @param external_id [String, nil] Your system's unique identifier for this user.
|
|
123
|
+
# @param external_id [String, nil] Your system's unique identifier for this user. When userId is absent, we search
|
|
123
124
|
#
|
|
124
125
|
# @param identity_context [OursprivacyIngest::Models::TrackEventParams::IdentityContext, nil] End-user network context for server-side calls. Required for probabilistic ident
|
|
125
126
|
#
|
|
@@ -34,19 +34,20 @@ module OursprivacyIngest
|
|
|
34
34
|
nil?: true
|
|
35
35
|
|
|
36
36
|
# @!attribute email
|
|
37
|
-
# The email address of a user.
|
|
38
|
-
#
|
|
39
|
-
#
|
|
37
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
38
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
39
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
40
|
+
# visitor.
|
|
40
41
|
#
|
|
41
42
|
# @return [String, nil]
|
|
42
43
|
optional :email, String, nil?: true
|
|
43
44
|
|
|
44
45
|
# @!attribute external_id
|
|
45
|
-
# Your system's unique identifier for this user.
|
|
46
|
-
# existing visitor with this externalId
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
46
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
47
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
48
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
49
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
50
|
+
# removes the lookup round-trip.
|
|
50
51
|
#
|
|
51
52
|
# @return [String, nil]
|
|
52
53
|
optional :external_id, String, api_name: :externalId, nil?: true
|
|
@@ -64,9 +65,9 @@ module OursprivacyIngest
|
|
|
64
65
|
|
|
65
66
|
# @!attribute user_id
|
|
66
67
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
67
|
-
# When present, this is used directly — no lookup by externalId or
|
|
68
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
69
|
-
# is attached to the right visitor without any lookup overhead.
|
|
68
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
69
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
70
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
70
71
|
#
|
|
71
72
|
# @return [String, nil]
|
|
72
73
|
optional :user_id, String, api_name: :userId, nil?: true
|
|
@@ -81,9 +82,9 @@ module OursprivacyIngest
|
|
|
81
82
|
#
|
|
82
83
|
# @param default_properties [OursprivacyIngest::Models::VisitorUpsertParams::DefaultProperties, nil] These properties are used throughout the Ours app to pass known values onto dest
|
|
83
84
|
#
|
|
84
|
-
# @param email [String, nil] The email address of a user.
|
|
85
|
+
# @param email [String, nil] The email address of a user. When userId is absent and externalId does not resol
|
|
85
86
|
#
|
|
86
|
-
# @param external_id [String, nil] Your system's unique identifier for this user.
|
|
87
|
+
# @param external_id [String, nil] Your system's unique identifier for this user. When userId is absent, we search
|
|
87
88
|
#
|
|
88
89
|
# @param identity_context [OursprivacyIngest::Models::VisitorUpsertParams::IdentityContext, nil] End-user network context for server-side calls. Required for probabilistic ident
|
|
89
90
|
#
|
|
@@ -6,15 +6,18 @@ module OursprivacyIngest
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {OursprivacyIngest::Models::TrackEventParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
# Track events from your server. Include
|
|
10
|
-
#
|
|
11
|
-
# priority order: userId (direct, no lookup) →
|
|
12
|
-
# email
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
9
|
+
# Track events from your server. Include userId, externalId, email, or
|
|
10
|
+
# userProperties.phone_number to associate the event with an existing visitor.
|
|
11
|
+
# Identity resolution runs in priority order: userId (direct, no lookup) →
|
|
12
|
+
# externalId → email → userProperties.phone_number. Each lookup runs only if
|
|
13
|
+
# earlier identifiers did not resolve a visitor. Phone matching ignores common
|
|
14
|
+
# formatting and an international + or 00 prefix, but does not infer a country
|
|
15
|
+
# code. If you know both userId and externalId, send both. For top-level visitor
|
|
16
|
+
# properties: null clears the existing value, while undefined, omitted fields, and
|
|
17
|
+
# empty strings are ignored. For entries inside custom_properties: null,
|
|
18
|
+
# undefined, and empty strings are all ignored (custom_properties use merge
|
|
19
|
+
# semantics). See https://docs.oursprivacy.com/docs/data-types for details and
|
|
20
|
+
# common pitfalls.
|
|
18
21
|
#
|
|
19
22
|
# @overload event(token:, event:, default_properties: nil, distinct_id: nil, email: nil, event_properties: nil, external_id: nil, identity_context: nil, time: nil, user_id: nil, user_properties: nil, request_options: {})
|
|
20
23
|
#
|
|
@@ -26,11 +29,11 @@ module OursprivacyIngest
|
|
|
26
29
|
#
|
|
27
30
|
# @param distinct_id [String, nil] A unique identifier for this event used for deduplication. Highly recommended —
|
|
28
31
|
#
|
|
29
|
-
# @param email [String, nil] The email address of a user.
|
|
32
|
+
# @param email [String, nil] The email address of a user. When userId is absent and externalId does not resol
|
|
30
33
|
#
|
|
31
34
|
# @param event_properties [Hash{Symbol=>String, nil}, nil] Any additional event properties you want to pass along.
|
|
32
35
|
#
|
|
33
|
-
# @param external_id [String, nil] Your system's unique identifier for this user.
|
|
36
|
+
# @param external_id [String, nil] Your system's unique identifier for this user. When userId is absent, we search
|
|
34
37
|
#
|
|
35
38
|
# @param identity_context [OursprivacyIngest::Models::TrackEventParams::IdentityContext, nil] End-user network context for server-side calls. Required for probabilistic ident
|
|
36
39
|
#
|
|
@@ -9,13 +9,16 @@ module OursprivacyIngest
|
|
|
9
9
|
# Set or update properties on an existing visitor, or create a new visitor if no
|
|
10
10
|
# match is found. This fires a $identify event, making the call visible in the
|
|
11
11
|
# event stream. Identity resolution runs in priority order: userId (direct, no
|
|
12
|
-
# lookup) → externalId
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
12
|
+
# lookup) → externalId → email → userProperties.phone_number. Each lookup runs
|
|
13
|
+
# only if earlier identifiers did not resolve a visitor. Phone matching ignores
|
|
14
|
+
# common formatting and an international + or 00 prefix, but does not infer a
|
|
15
|
+
# country code. When a visitor is found, their Ours Visitor ID is used going
|
|
16
|
+
# forward so all future events are attached to the same profile. For top-level
|
|
17
|
+
# visitor properties: null clears the existing value, while undefined, omitted
|
|
18
|
+
# fields, and empty strings are ignored. For entries inside custom_properties:
|
|
19
|
+
# null, undefined, and empty strings are all ignored (custom_properties use merge
|
|
20
|
+
# semantics). See https://docs.oursprivacy.com/docs/data-types for details and
|
|
21
|
+
# common pitfalls.
|
|
19
22
|
#
|
|
20
23
|
# @overload upsert(token:, user_properties:, default_properties: nil, email: nil, external_id: nil, identity_context: nil, user_id: nil, request_options: {})
|
|
21
24
|
#
|
|
@@ -25,9 +28,9 @@ module OursprivacyIngest
|
|
|
25
28
|
#
|
|
26
29
|
# @param default_properties [OursprivacyIngest::Models::VisitorUpsertParams::DefaultProperties, nil] These properties are used throughout the Ours app to pass known values onto dest
|
|
27
30
|
#
|
|
28
|
-
# @param email [String, nil] The email address of a user.
|
|
31
|
+
# @param email [String, nil] The email address of a user. When userId is absent and externalId does not resol
|
|
29
32
|
#
|
|
30
|
-
# @param external_id [String, nil] Your system's unique identifier for this user.
|
|
33
|
+
# @param external_id [String, nil] Your system's unique identifier for this user. When userId is absent, we search
|
|
31
34
|
#
|
|
32
35
|
# @param identity_context [OursprivacyIngest::Models::VisitorUpsertParams::IdentityContext, nil] End-user network context for server-side calls. Required for probabilistic ident
|
|
33
36
|
#
|
|
@@ -92,9 +92,10 @@ module OursprivacyIngest
|
|
|
92
92
|
end
|
|
93
93
|
attr_writer :default_properties
|
|
94
94
|
|
|
95
|
-
# The email address of a user.
|
|
96
|
-
#
|
|
97
|
-
#
|
|
95
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
96
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
97
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
98
|
+
# visitor.
|
|
98
99
|
sig { returns(T.nilable(String)) }
|
|
99
100
|
attr_accessor :email
|
|
100
101
|
|
|
@@ -102,11 +103,11 @@ module OursprivacyIngest
|
|
|
102
103
|
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
103
104
|
attr_accessor :event_properties
|
|
104
105
|
|
|
105
|
-
# Your system's unique identifier for this user.
|
|
106
|
-
# existing visitor with this externalId
|
|
107
|
-
#
|
|
108
|
-
#
|
|
109
|
-
#
|
|
106
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
107
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
108
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
109
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
110
|
+
# removes the lookup round-trip.
|
|
110
111
|
sig { returns(T.nilable(String)) }
|
|
111
112
|
attr_accessor :external_id
|
|
112
113
|
|
|
@@ -138,9 +139,9 @@ module OursprivacyIngest
|
|
|
138
139
|
attr_accessor :time
|
|
139
140
|
|
|
140
141
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
141
|
-
# When present, this is used directly — no lookup by externalId or
|
|
142
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
143
|
-
# is attached to the right visitor without any lookup overhead.
|
|
142
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
143
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
144
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
144
145
|
sig { returns(T.nilable(String)) }
|
|
145
146
|
attr_accessor :user_id
|
|
146
147
|
|
|
@@ -200,17 +201,18 @@ module OursprivacyIngest
|
|
|
200
201
|
# These properties are used throughout the Ours app to pass known values onto
|
|
201
202
|
# destinations
|
|
202
203
|
default_properties: nil,
|
|
203
|
-
# The email address of a user.
|
|
204
|
-
#
|
|
205
|
-
#
|
|
204
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
205
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
206
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
207
|
+
# visitor.
|
|
206
208
|
email: nil,
|
|
207
209
|
# Any additional event properties you want to pass along.
|
|
208
210
|
event_properties: nil,
|
|
209
|
-
# Your system's unique identifier for this user.
|
|
210
|
-
# existing visitor with this externalId
|
|
211
|
-
#
|
|
212
|
-
#
|
|
213
|
-
#
|
|
211
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
212
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
213
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
214
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
215
|
+
# removes the lookup round-trip.
|
|
214
216
|
external_id: nil,
|
|
215
217
|
# End-user network context for server-side calls. Required for probabilistic
|
|
216
218
|
# identity resolution when the caller is a backend server rather than an end-user
|
|
@@ -220,9 +222,9 @@ module OursprivacyIngest
|
|
|
220
222
|
# must be in the past and within the last 7 days.
|
|
221
223
|
time: nil,
|
|
222
224
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
223
|
-
# When present, this is used directly — no lookup by externalId or
|
|
224
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
225
|
-
# is attached to the right visitor without any lookup overhead.
|
|
225
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
226
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
227
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
226
228
|
user_id: nil,
|
|
227
229
|
# Properties to set on the visitor. (optional) You can also update these
|
|
228
230
|
# properties via the identify endpoint.
|
|
@@ -49,9 +49,10 @@ module OursprivacyIngest
|
|
|
49
49
|
sig { returns(T.nilable(String)) }
|
|
50
50
|
attr_accessor :distinct_id
|
|
51
51
|
|
|
52
|
-
# The email address of a user.
|
|
53
|
-
#
|
|
54
|
-
#
|
|
52
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
53
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
54
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
55
|
+
# visitor.
|
|
55
56
|
sig { returns(T.nilable(String)) }
|
|
56
57
|
attr_accessor :email
|
|
57
58
|
|
|
@@ -59,11 +60,11 @@ module OursprivacyIngest
|
|
|
59
60
|
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
60
61
|
attr_accessor :event_properties
|
|
61
62
|
|
|
62
|
-
# Your system's unique identifier for this user.
|
|
63
|
-
# existing visitor with this externalId
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
#
|
|
63
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
64
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
65
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
66
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
67
|
+
# removes the lookup round-trip.
|
|
67
68
|
sig { returns(T.nilable(String)) }
|
|
68
69
|
attr_accessor :external_id
|
|
69
70
|
|
|
@@ -91,9 +92,9 @@ module OursprivacyIngest
|
|
|
91
92
|
attr_accessor :time
|
|
92
93
|
|
|
93
94
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
94
|
-
# When present, this is used directly — no lookup by externalId or
|
|
95
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
96
|
-
# is attached to the right visitor without any lookup overhead.
|
|
95
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
96
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
97
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
97
98
|
sig { returns(T.nilable(String)) }
|
|
98
99
|
attr_accessor :user_id
|
|
99
100
|
|
|
@@ -153,17 +154,18 @@ module OursprivacyIngest
|
|
|
153
154
|
# stronger idempotency guarantees (e.g. a Stripe payment intent ID or your
|
|
154
155
|
# internal order ID).
|
|
155
156
|
distinct_id: nil,
|
|
156
|
-
# The email address of a user.
|
|
157
|
-
#
|
|
158
|
-
#
|
|
157
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
158
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
159
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
160
|
+
# visitor.
|
|
159
161
|
email: nil,
|
|
160
162
|
# Any additional event properties you want to pass along.
|
|
161
163
|
event_properties: nil,
|
|
162
|
-
# Your system's unique identifier for this user.
|
|
163
|
-
# existing visitor with this externalId
|
|
164
|
-
#
|
|
165
|
-
#
|
|
166
|
-
#
|
|
164
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
165
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
166
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
167
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
168
|
+
# removes the lookup round-trip.
|
|
167
169
|
external_id: nil,
|
|
168
170
|
# End-user network context for server-side calls. Required for probabilistic
|
|
169
171
|
# identity resolution when the caller is a backend server rather than an end-user
|
|
@@ -173,9 +175,9 @@ module OursprivacyIngest
|
|
|
173
175
|
# must be in the past and within the last 7 days.
|
|
174
176
|
time: nil,
|
|
175
177
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
176
|
-
# When present, this is used directly — no lookup by externalId or
|
|
177
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
178
|
-
# is attached to the right visitor without any lookup overhead.
|
|
178
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
179
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
180
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
179
181
|
user_id: nil,
|
|
180
182
|
# Properties to set on the visitor. (optional) You can also update these
|
|
181
183
|
# properties via the identify endpoint.
|
|
@@ -51,17 +51,18 @@ module OursprivacyIngest
|
|
|
51
51
|
end
|
|
52
52
|
attr_writer :default_properties
|
|
53
53
|
|
|
54
|
-
# The email address of a user.
|
|
55
|
-
#
|
|
56
|
-
#
|
|
54
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
55
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
56
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
57
|
+
# visitor.
|
|
57
58
|
sig { returns(T.nilable(String)) }
|
|
58
59
|
attr_accessor :email
|
|
59
60
|
|
|
60
|
-
# Your system's unique identifier for this user.
|
|
61
|
-
# existing visitor with this externalId
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
#
|
|
61
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
62
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
63
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
64
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
65
|
+
# removes the lookup round-trip.
|
|
65
66
|
sig { returns(T.nilable(String)) }
|
|
66
67
|
attr_accessor :external_id
|
|
67
68
|
|
|
@@ -86,9 +87,9 @@ module OursprivacyIngest
|
|
|
86
87
|
attr_writer :identity_context
|
|
87
88
|
|
|
88
89
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
89
|
-
# When present, this is used directly — no lookup by externalId or
|
|
90
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
91
|
-
# is attached to the right visitor without any lookup overhead.
|
|
90
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
91
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
92
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
92
93
|
sig { returns(T.nilable(String)) }
|
|
93
94
|
attr_accessor :user_id
|
|
94
95
|
|
|
@@ -121,24 +122,25 @@ module OursprivacyIngest
|
|
|
121
122
|
# These properties are used throughout the Ours app to pass known values onto
|
|
122
123
|
# destinations
|
|
123
124
|
default_properties: nil,
|
|
124
|
-
# The email address of a user.
|
|
125
|
-
#
|
|
126
|
-
#
|
|
125
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
126
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
127
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
128
|
+
# visitor.
|
|
127
129
|
email: nil,
|
|
128
|
-
# Your system's unique identifier for this user.
|
|
129
|
-
# existing visitor with this externalId
|
|
130
|
-
#
|
|
131
|
-
#
|
|
132
|
-
#
|
|
130
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
131
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
132
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
133
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
134
|
+
# removes the lookup round-trip.
|
|
133
135
|
external_id: nil,
|
|
134
136
|
# End-user network context for server-side calls. Required for probabilistic
|
|
135
137
|
# identity resolution when the caller is a backend server rather than an end-user
|
|
136
138
|
# browser.
|
|
137
139
|
identity_context: nil,
|
|
138
140
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
139
|
-
# When present, this is used directly — no lookup by externalId or
|
|
140
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
141
|
-
# is attached to the right visitor without any lookup overhead.
|
|
141
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
142
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
143
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
142
144
|
user_id: nil,
|
|
143
145
|
request_options: {}
|
|
144
146
|
)
|
|
@@ -3,15 +3,18 @@
|
|
|
3
3
|
module OursprivacyIngest
|
|
4
4
|
module Resources
|
|
5
5
|
class Track
|
|
6
|
-
# Track events from your server. Include
|
|
7
|
-
#
|
|
8
|
-
# priority order: userId (direct, no lookup) →
|
|
9
|
-
# email
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
6
|
+
# Track events from your server. Include userId, externalId, email, or
|
|
7
|
+
# userProperties.phone_number to associate the event with an existing visitor.
|
|
8
|
+
# Identity resolution runs in priority order: userId (direct, no lookup) →
|
|
9
|
+
# externalId → email → userProperties.phone_number. Each lookup runs only if
|
|
10
|
+
# earlier identifiers did not resolve a visitor. Phone matching ignores common
|
|
11
|
+
# formatting and an international + or 00 prefix, but does not infer a country
|
|
12
|
+
# code. If you know both userId and externalId, send both. For top-level visitor
|
|
13
|
+
# properties: null clears the existing value, while undefined, omitted fields, and
|
|
14
|
+
# empty strings are ignored. For entries inside custom_properties: null,
|
|
15
|
+
# undefined, and empty strings are all ignored (custom_properties use merge
|
|
16
|
+
# semantics). See https://docs.oursprivacy.com/docs/data-types for details and
|
|
17
|
+
# common pitfalls.
|
|
15
18
|
sig do
|
|
16
19
|
params(
|
|
17
20
|
token: String,
|
|
@@ -51,17 +54,18 @@ module OursprivacyIngest
|
|
|
51
54
|
# stronger idempotency guarantees (e.g. a Stripe payment intent ID or your
|
|
52
55
|
# internal order ID).
|
|
53
56
|
distinct_id: nil,
|
|
54
|
-
# The email address of a user.
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
58
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
59
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
60
|
+
# visitor.
|
|
57
61
|
email: nil,
|
|
58
62
|
# Any additional event properties you want to pass along.
|
|
59
63
|
event_properties: nil,
|
|
60
|
-
# Your system's unique identifier for this user.
|
|
61
|
-
# existing visitor with this externalId
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
#
|
|
64
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
65
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
66
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
67
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
68
|
+
# removes the lookup round-trip.
|
|
65
69
|
external_id: nil,
|
|
66
70
|
# End-user network context for server-side calls. Required for probabilistic
|
|
67
71
|
# identity resolution when the caller is a backend server rather than an end-user
|
|
@@ -71,9 +75,9 @@ module OursprivacyIngest
|
|
|
71
75
|
# must be in the past and within the last 7 days.
|
|
72
76
|
time: nil,
|
|
73
77
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
74
|
-
# When present, this is used directly — no lookup by externalId or
|
|
75
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
76
|
-
# is attached to the right visitor without any lookup overhead.
|
|
78
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
79
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
80
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
77
81
|
user_id: nil,
|
|
78
82
|
# Properties to set on the visitor. (optional) You can also update these
|
|
79
83
|
# properties via the identify endpoint.
|
|
@@ -6,13 +6,16 @@ module OursprivacyIngest
|
|
|
6
6
|
# Set or update properties on an existing visitor, or create a new visitor if no
|
|
7
7
|
# match is found. This fires a $identify event, making the call visible in the
|
|
8
8
|
# event stream. Identity resolution runs in priority order: userId (direct, no
|
|
9
|
-
# lookup) → externalId
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
9
|
+
# lookup) → externalId → email → userProperties.phone_number. Each lookup runs
|
|
10
|
+
# only if earlier identifiers did not resolve a visitor. Phone matching ignores
|
|
11
|
+
# common formatting and an international + or 00 prefix, but does not infer a
|
|
12
|
+
# country code. When a visitor is found, their Ours Visitor ID is used going
|
|
13
|
+
# forward so all future events are attached to the same profile. For top-level
|
|
14
|
+
# visitor properties: null clears the existing value, while undefined, omitted
|
|
15
|
+
# fields, and empty strings are ignored. For entries inside custom_properties:
|
|
16
|
+
# null, undefined, and empty strings are all ignored (custom_properties use merge
|
|
17
|
+
# semantics). See https://docs.oursprivacy.com/docs/data-types for details and
|
|
18
|
+
# common pitfalls.
|
|
16
19
|
sig do
|
|
17
20
|
params(
|
|
18
21
|
token: String,
|
|
@@ -42,24 +45,25 @@ module OursprivacyIngest
|
|
|
42
45
|
# These properties are used throughout the Ours app to pass known values onto
|
|
43
46
|
# destinations
|
|
44
47
|
default_properties: nil,
|
|
45
|
-
# The email address of a user.
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
+
# The email address of a user. When userId is absent and externalId does not
|
|
49
|
+
# resolve a visitor, we search your account for a visitor with this email. If no
|
|
50
|
+
# match is found, we try userProperties.phone_number before creating a new
|
|
51
|
+
# visitor.
|
|
48
52
|
email: nil,
|
|
49
|
-
# Your system's unique identifier for this user.
|
|
50
|
-
# existing visitor with this externalId
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
53
|
+
# Your system's unique identifier for this user. When userId is absent, we search
|
|
54
|
+
# your account for an existing visitor with this externalId. If no match is found,
|
|
55
|
+
# we try email and then userProperties.phone_number before creating a new visitor.
|
|
56
|
+
# If you also have the userId from cookies or local storage, send both — it
|
|
57
|
+
# removes the lookup round-trip.
|
|
54
58
|
external_id: nil,
|
|
55
59
|
# End-user network context for server-side calls. Required for probabilistic
|
|
56
60
|
# identity resolution when the caller is a backend server rather than an end-user
|
|
57
61
|
# browser.
|
|
58
62
|
identity_context: nil,
|
|
59
63
|
# The Ours Visitor ID stored in local storage and cookies on your web properties.
|
|
60
|
-
# When present, this is used directly — no lookup by externalId or
|
|
61
|
-
# performed. If you have both a userId and an externalId, send both so the
|
|
62
|
-
# is attached to the right visitor without any lookup overhead.
|
|
64
|
+
# When present, this is used directly — no lookup by externalId, email, or phone
|
|
65
|
+
# is performed. If you have both a userId and an externalId, send both so the
|
|
66
|
+
# event is attached to the right visitor without any lookup overhead.
|
|
63
67
|
user_id: nil,
|
|
64
68
|
request_options: {}
|
|
65
69
|
)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: oursprivacy-ingest
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ours Privacy
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|