mbuzz 0.7.5 → 0.8.1
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 +12 -0
- data/README.md +1 -1
- data/lib/mbuzz/client/conversion_request.rb +13 -3
- data/lib/mbuzz/client/track_request.rb +13 -3
- data/lib/mbuzz/configuration.rb +1 -1
- data/lib/mbuzz/version.rb +1 -1
- data/lib/mbuzz.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3725da0e1a4fb06b393abd356cf408a7bc2a1ba27aeed2e4bc49b9047469b77
|
|
4
|
+
data.tar.gz: 926572f620afc1108fb902b3270404b79b35e112285efd032fd449c4c7f84164
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0718ffe4e0ee5ca2aa499aefdf7ef7c79046f99ab35ab19f8cd9209ba8b6c75f42be031e82f1cef4a875249cd2e846a74c5401a798b3036bad96386ade2ce5b6'
|
|
7
|
+
data.tar.gz: 9d9952f1adfdfd15320946b6416ae84a5c1f10c1b2a7a81eb972dc184e36f18684674cc7129afaa1a97b877c546febf412112ddec6e74b64278111cdabc30456
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.8.1] - 2026-03-16
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`event()` and `conversion()` now handle proxy-buffered responses gracefully** — when the edge proxy accepts a request but Rails is temporarily unreachable, the SDK returns `{ success: true }` with nil IDs instead of `false`. Data is safe in the proxy buffer and will be processed on recovery.
|
|
13
|
+
|
|
14
|
+
## [0.8.0] - 2026-03-13
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **Default API URL updated to `https://api.mbuzz.co/api/v1`** — traffic now routes through the edge ingest proxy for improved reliability. The previous URL (`https://mbuzz.co/api/v1`) remains supported as a configurable fallback via `api_url`.
|
|
19
|
+
|
|
8
20
|
## [0.7.4] - 2026-02-17
|
|
9
21
|
|
|
10
22
|
### Fixed
|
data/README.md
CHANGED
|
@@ -197,7 +197,7 @@ run MyApp
|
|
|
197
197
|
```ruby
|
|
198
198
|
Mbuzz.init(
|
|
199
199
|
api_key: "sk_live_...", # Required - from mbuzz.co dashboard
|
|
200
|
-
api_url: "https://mbuzz.co/api/v1", # Optional - API endpoint
|
|
200
|
+
api_url: "https://api.mbuzz.co/api/v1", # Optional - API endpoint
|
|
201
201
|
debug: false # Optional - enable debug logging
|
|
202
202
|
)
|
|
203
203
|
```
|
|
@@ -19,15 +19,25 @@ module Mbuzz
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def call
|
|
22
|
-
return false unless
|
|
22
|
+
return false unless input_valid?
|
|
23
|
+
return proxy_result if proxy_accepted?
|
|
24
|
+
return false unless conversion_id
|
|
23
25
|
|
|
24
26
|
{ success: true, conversion_id: conversion_id, attribution: attribution }
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
private
|
|
28
30
|
|
|
29
|
-
def
|
|
30
|
-
has_identifier? && present?(@conversion_type) && hash?(@properties)
|
|
31
|
+
def input_valid?
|
|
32
|
+
has_identifier? && present?(@conversion_type) && hash?(@properties)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def proxy_accepted?
|
|
36
|
+
response && response["status"] == "accepted" && !response.key?("conversion")
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def proxy_result
|
|
40
|
+
{ success: true, conversion_id: nil, attribution: nil }
|
|
31
41
|
end
|
|
32
42
|
|
|
33
43
|
def has_identifier?
|
|
@@ -14,7 +14,9 @@ module Mbuzz
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def call
|
|
17
|
-
return false unless
|
|
17
|
+
return false unless input_valid?
|
|
18
|
+
return proxy_result if proxy_accepted?
|
|
19
|
+
return false unless event
|
|
18
20
|
|
|
19
21
|
{ success: true, event_id: event["id"], event_type: event["event_type"],
|
|
20
22
|
visitor_id: event["visitor_id"], session_id: event["session_id"] }
|
|
@@ -22,8 +24,16 @@ module Mbuzz
|
|
|
22
24
|
|
|
23
25
|
private
|
|
24
26
|
|
|
25
|
-
def
|
|
26
|
-
present?(@event_type) && hash?(@properties) && (@user_id || @visitor_id)
|
|
27
|
+
def input_valid?
|
|
28
|
+
present?(@event_type) && hash?(@properties) && (@user_id || @visitor_id)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def proxy_accepted?
|
|
32
|
+
response && response["status"] == "accepted" && !response.key?("events")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def proxy_result
|
|
36
|
+
{ success: true, event_id: nil, event_type: @event_type, visitor_id: @visitor_id, session_id: nil }
|
|
27
37
|
end
|
|
28
38
|
|
|
29
39
|
def event
|
data/lib/mbuzz/configuration.rb
CHANGED
data/lib/mbuzz/version.rb
CHANGED
data/lib/mbuzz.rb
CHANGED
|
@@ -42,7 +42,7 @@ module Mbuzz
|
|
|
42
42
|
|
|
43
43
|
# New simplified configuration method (v0.5.0)
|
|
44
44
|
# @param api_key [String] Your mbuzz API key
|
|
45
|
-
# @param api_url [String, nil] Override API URL (defaults to https://mbuzz.co/api/v1)
|
|
45
|
+
# @param api_url [String, nil] Override API URL (defaults to https://api.mbuzz.co/api/v1)
|
|
46
46
|
# @param session_timeout [Integer, nil] Session timeout in seconds
|
|
47
47
|
# @param debug [Boolean, nil] Enable debug logging
|
|
48
48
|
# @param skip_paths [Array<String>, nil] Additional paths to skip tracking (e.g., ["/admin", "/internal"])
|