@formo/analytics 1.16.13 → 1.16.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formo/analytics",
3
- "version": "1.16.13",
3
+ "version": "1.16.15",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/getformo/sdk.git"
@@ -210,13 +210,7 @@ class EventFactory implements IEventFactory {
210
210
  version: VERSION,
211
211
  } as Partial<IFormoEvent>;
212
212
 
213
- if (!cookie().isAvailable()) {
214
- commonEventData.anonymous_id = generateNativeUUID();
215
- } else {
216
- commonEventData.anonymous_id = generateAnonymousId(
217
- LOCAL_ANONYMOUS_ID_KEY
218
- );
219
- }
213
+ commonEventData.anonymous_id = generateAnonymousId(LOCAL_ANONYMOUS_ID_KEY);
220
214
 
221
215
  if (formoEvent.address) {
222
216
  commonEventData.address = toChecksumAddress(formoEvent.address);
@@ -3,15 +3,9 @@ import { CookieOptions } from "../type";
3
3
 
4
4
  class CookieStorage extends StorageBlueprint {
5
5
  public override isAvailable(): boolean {
6
- try {
7
- document.cookie = "cookie_test=1";
8
- const available = document.cookie.includes("cookie_test=");
9
- document.cookie =
10
- "cookie_test=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT";
11
- return available;
12
- } catch {
13
- return false;
14
- }
6
+ return (
7
+ typeof document !== "undefined" && typeof document.cookie !== "undefined"
8
+ );
15
9
  }
16
10
 
17
11
  public override set(
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '1.16.13';
2
+ export const version = '1.16.15';