@cascayd/experiment 0.3.1 → 0.3.3
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/dist/client.js +12 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -101,3 +101,15 @@ export async function record(type, opts = {}) {
|
|
|
101
101
|
if (!res.ok)
|
|
102
102
|
throw new Error(`Record failed: ${res.status}`);
|
|
103
103
|
}
|
|
104
|
+
// Expose functions to window for browser/Shopify theme compatibility
|
|
105
|
+
if (typeof window !== 'undefined') {
|
|
106
|
+
;
|
|
107
|
+
window.initCascayd = initCascayd;
|
|
108
|
+
window.assignVariant = assignVariant;
|
|
109
|
+
window.record = record;
|
|
110
|
+
window.Cascayd = {
|
|
111
|
+
initCascayd,
|
|
112
|
+
assignVariant,
|
|
113
|
+
record,
|
|
114
|
+
};
|
|
115
|
+
}
|