You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,54 @@
1
1
# Changelog
2
+
2
3
All notable changes to this project will be documented in this file.
3
4
4
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
7
8
+
## [1.18.0] - 2026-02-05
9
+
10
+
### Added
11
+
12
+
- Added session management capabilities to enable integration with VWO's web client testing campaigns. The SDK now automatically generates and manages session IDs to connect server-side feature flag decisions with client-side user sessions.
13
+
14
+
Example usage:
15
+
16
+
```python
17
+
from vwo import init
18
+
19
+
options = {
20
+
'sdk_key': '32-alpha-numeric-sdk-key',
21
+
'account_id': '123456',
22
+
}
23
+
24
+
vwo_client = init(options)
25
+
26
+
# Session ID is automatically generated if not provided
27
+
context = {'id': 'user-123'}
28
+
flag = vwo_client.get_flag('feature-key', context)
29
+
30
+
# Access the session ID to pass to web client for session recording
31
+
session_id = flag.get_session_id()
32
+
print(f"Session ID for web client: {session_id}")
33
+
```
34
+
35
+
You can also explicitly set a session ID to match a web client session:
36
+
37
+
```python
38
+
from vwo import init
39
+
40
+
vwo_client = init(options)
41
+
42
+
context = {
43
+
'id': 'user-123',
44
+
'session_id': 1697123456# Custom session ID matching web client
45
+
}
46
+
47
+
flag = vwo_client.get_flag('feature-key', context)
48
+
```
49
+
50
+
This enhancement enables seamless integration between server-side feature flag decisions and client-side session recording, allowing for comprehensive user behavior analysis across both server and client environments.
The `getUUID` function generates a deterministic UUID for a given user and account combination. This utility function can be used without initializing the SDK, making it useful for generating consistent UUIDs across different parts of your application.
- Generate consistent UUIDs for users across different services
95
+
- Create deterministic identifiers for analytics and tracking
96
+
- Generate UUIDs without requiring SDK initialization
97
+
53
98
## Advanced Configuration Options
54
99
55
100
To customize the SDK further, additional parameters can be passed to the `init()` API. Here’s a table describing each option:
@@ -82,6 +127,7 @@ The following table explains all the parameters in the `context` dictionary:
82
127
|`custom_variables`| Custom attributes for targeting. | No | Dict |
83
128
|`user_agent`| User agent string for identifying the user's browser and operating system. | No | str |
84
129
|`ip_address`| IP address of the user. | No | str |
130
+
|`session_id`| Session ID for connecting server-side decisions with client-side sessions. | No | int |
85
131
86
132
#### Example
87
133
@@ -93,10 +139,64 @@ context = {
93
139
'location': 'US'
94
140
},
95
141
'user_agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36',
96
-
'ip_address': '1.1.1.1'
142
+
'ip_address': '1.1.1.1',
143
+
'session_id': 1697123456# Optional: Custom session ID for web client integration
144
+
}
145
+
```
146
+
147
+
## Session Management
148
+
149
+
The SDK provides automatic session management capabilities to enable seamless integration with VWO's web client testing campaigns. Session IDs are automatically generated and managed to connect server-side feature flag decisions with client-side user sessions.
150
+
151
+
### Automatic Session ID Generation
152
+
153
+
Session IDs are automatically generated using Unix timestamps when not explicitly provided in the context. This ensures consistent session tracking across all feature flag evaluations and event tracking.
154
+
155
+
### Session ID Access
156
+
157
+
You can access and manage session IDs through the following methods:
158
+
159
+
-**Get Session ID from Flag**: Use `get_flag.get_session_id()` to retrieve the session ID used for a specific feature flag evaluation
160
+
-**Set Custom Session ID**: Set `session_id` in your context dictionary to use a custom session ID (useful for matching web client sessions)
161
+
162
+
### Example Usage
163
+
164
+
```python
165
+
from vwo import init
166
+
167
+
options = {
168
+
'sdk_key': '32-alpha-numeric-sdk-key',
169
+
'account_id': '123456'
170
+
}
171
+
172
+
vwo_client = init(options)
173
+
174
+
# Session ID is automatically generated if not provided
175
+
context = {'id': 'user-123'}
176
+
flag = vwo_client.get_flag('feature-key', context)
177
+
178
+
# Access the session ID to pass to web client for session recording
179
+
session_id = flag.get_session_id()
180
+
print(f"Session ID for web client: {session_id}")
181
+
```
182
+
183
+
You can also explicitly set a session ID to match a web client session:
184
+
185
+
```python
186
+
from vwo import init
187
+
188
+
vwo_client = init(options)
189
+
190
+
context_with_session = {
191
+
'id': 'user-123',
192
+
'session_id': 1697123456# Custom session ID matching web client
97
193
}
194
+
195
+
flag = vwo_client.get_flag('feature-key', context_with_session)
98
196
```
99
197
198
+
This enhancement enables seamless integration between server-side feature flag decisions and client-side session recording, allowing for comprehensive user behavior analysis across both server and client environments.
199
+
100
200
### Basic Feature Flagging
101
201
102
202
Feature Flags serve as the foundation for all testing, personalization, and rollout rules within FME.
0 commit comments