@blotoutio/providers-blotout-popup-sdk 1.70.2
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.
- package/README.md +38 -0
- package/index.cjs.js +9664 -0
- package/index.d.ts +19 -0
- package/index.js +9667 -0
- package/index.mjs +9662 -0
- package/package.json +41 -0
- package/stores/shopify/index.cjs.js +230 -0
- package/stores/shopify/index.js +233 -0
- package/stores/shopify/index.mjs +228 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @blotoutio/providers-blotout-popup-sdk
|
|
2
|
+
|
|
3
|
+
Browser-side Blotout Popup runtime for EdgeTag. Renders popup rules authored in the
|
|
4
|
+
Blotout Popup dashboard into the merchant storefront — modal, slide-in, bar, floating
|
|
5
|
+
box, and fullscreen takeover formats.
|
|
6
|
+
|
|
7
|
+
## Loading
|
|
8
|
+
|
|
9
|
+
The CDN worker emits the bundle URL on every storefront page-load when the
|
|
10
|
+
provider's `uiPreferences.mode` is `enabled` or `preview`. The bundle's `init`
|
|
11
|
+
entry point reads `manifest.variables.popupRules`, picks the first rule whose
|
|
12
|
+
conditions, schedule, and fatigue all pass, and appends the rendered popup to
|
|
13
|
+
`document.body`.
|
|
14
|
+
|
|
15
|
+
## Events
|
|
16
|
+
|
|
17
|
+
The SDK dispatches custom DOM events on the popup root for host integrations:
|
|
18
|
+
|
|
19
|
+
| Event | Detail |
|
|
20
|
+
| --------------------------- | ------------------------------------- |
|
|
21
|
+
| `blotoutpopup:submit` | `{ ruleId, formData, integrations? }` |
|
|
22
|
+
| `blotoutpopup:dismiss` | — |
|
|
23
|
+
| `blotoutpopup:gotostep` | `{ ruleId, stepId }` |
|
|
24
|
+
| `blotoutpopup:couponcopied` | `{ ruleId, code }` |
|
|
25
|
+
|
|
26
|
+
## Fatigue + Schedule
|
|
27
|
+
|
|
28
|
+
Per-rule impression count, dismiss state, and conversion state are persisted
|
|
29
|
+
to `sessionStorage` or `localStorage` (keys prefixed `blotoutpopup:fatigue:`) based
|
|
30
|
+
on the rule's `fatigue` settings. The `schedule` window is re-checked at fire
|
|
31
|
+
time.
|
|
32
|
+
|
|
33
|
+
## CSP
|
|
34
|
+
|
|
35
|
+
The SDK appends a `<style>` element to `document.head` for keyframe animations
|
|
36
|
+
and, when the rule defines `rule.css`, appends a second `<style>` inside the
|
|
37
|
+
popup root. Storefronts with `style-src 'self'` (no `unsafe-inline`) will
|
|
38
|
+
block both — keyframe animations and merchant CSS won't apply.
|