@formo/analytics 1.16.14 → 1.16.16

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.14",
3
+ "version": "1.16.16",
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);
@@ -8,7 +8,7 @@ const generateAnonymousId = (key: string): AnonymousID => {
8
8
  return storedAnonymousId as AnonymousID;
9
9
  const newAnonymousId = generateNativeUUID();
10
10
  cookie().set(key, newAnonymousId, {
11
- maxAge: Date.now() + 1000 * 60 * 60 * 24 * 365, // 1 year
11
+ expires: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365).toISOString(), // 1 year
12
12
  domain: getCookieDomain(),
13
13
  path: "/",
14
14
  });
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '1.16.14';
2
+ export const version = '1.16.16';