billions-agent-63154
11/17/2023, 2:49 PMmillions-activity-52391
11/17/2023, 2:49 PMbillions-agent-63154
11/17/2023, 2:50 PMhundreds-lifeguard-65770
11/17/2023, 2:57 PMhundreds-lifeguard-65770
11/17/2023, 2:58 PMmillions-activity-52391
11/17/2023, 4:00 PMbillions-agent-63154
11/18/2023, 4:22 AMrequire 'rudder-sdk-ruby'
# Initialize the RudderStack client
config = {
write_key: 'YOUR_WRITE_KEY',
data_plane_url: 'YOUR_DATA_PLANE_URL',
max_queue_size: 2, # Assuming this configures the batch size
# other configuration options...
}
rudderstack_client = Rudder::Analytics.new(config)
# Queue events (they will be batched automatically based on the max_queue_size)
rudderstack_client.track(userId: 'user_123', event: 'Uninstall Event', properties: {/* event properties... */})
rudderstack_client.track(userId: 'user_456', event: 'Expired Subscription', properties: {/* event properties... */})
# The SDK should handle the batching and sending of these events automatically
Does this make sense?hundreds-lifeguard-65770
11/18/2023, 12:41 PMbillions-agent-63154
11/19/2023, 6:47 AM