@giphy/js-analytics
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -50,3 +50,3 @@ "use strict"; | ||
// it exists in storage | ||
gl.giphyRandomId = localStorage.get('giphyRandomId'); | ||
gl.giphyRandomId = localStorage.getItem('giphyRandomId'); | ||
} | ||
@@ -56,6 +56,6 @@ catch (_) { } | ||
// we need to create it | ||
gl.giphyRandomId = uuid_1.v4(); | ||
gl.giphyRandomId = uuid_1.v1(); | ||
try { | ||
// save in storage | ||
localStorage.set('giphyRandomId', gl.giphyRandomId); | ||
localStorage.setItem('giphyRandomId', gl.giphyRandomId); | ||
} | ||
@@ -62,0 +62,0 @@ catch (_) { } |
@@ -11,3 +11,3 @@ { | ||
"name": "@giphy/js-analytics", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"main": "dist/index.js", | ||
@@ -41,3 +41,3 @@ "types": "dist/index.d.ts", | ||
}, | ||
"gitHead": "4fa699d661f19c57eafb016df0b99b278381d73e" | ||
"gitHead": "26d8ff734a35fc3176f870cfe8ec6c8f5df78f02" | ||
} |
import cookie from 'cookie' | ||
import { PingbackEventType } from '@giphy/js-types' | ||
import { PingbackRequestAction } from './types' | ||
import { v4 as uuid } from 'uuid' | ||
import { v1 as uuid } from 'uuid' | ||
@@ -55,3 +55,3 @@ type SessionEvent = { | ||
// it exists in storage | ||
gl.giphyRandomId = localStorage.get('giphyRandomId') | ||
gl.giphyRandomId = localStorage.getItem('giphyRandomId') | ||
} catch (_) {} | ||
@@ -63,3 +63,3 @@ if (!gl.giphyRandomId) { | ||
// save in storage | ||
localStorage.set('giphyRandomId', gl.giphyRandomId) | ||
localStorage.setItem('giphyRandomId', gl.giphyRandomId) | ||
} catch (_) {} | ||
@@ -66,0 +66,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29159