diff --git a/packages/client-core/src/EventLogger.ts b/packages/client-core/src/EventLogger.ts index c5446bfd..5480899f 100644 --- a/packages/client-core/src/EventLogger.ts +++ b/packages/client-core/src/EventLogger.ts @@ -192,12 +192,17 @@ export class EventLogger { const userKey = _getUserStorageKey(this._sdkKey, user); const metadata = event.metadata ? event.metadata : {}; + const key = [ event.eventName, userKey, metadata['gate'], metadata['config'], metadata['ruleID'], + metadata['allocatedExperiment'], + metadata['parameterName'], + String(metadata['isExplicitParameter']), + metadata['reason'], ].join('|'); const previous = this._lastExposureTimeMap[key]; const now = Date.now(); diff --git a/packages/client-core/src/StatsigEvent.ts b/packages/client-core/src/StatsigEvent.ts index ee36772a..17cb6770 100644 --- a/packages/client-core/src/StatsigEvent.ts +++ b/packages/client-core/src/StatsigEvent.ts @@ -48,7 +48,11 @@ const _createExposure = ( export const _isExposureEvent = ({ eventName, }: StatsigEventInternal): boolean => { - return eventName === GATE_EXPOSURE_NAME || eventName === CONFIG_EXPOSURE_NAME; + return ( + eventName === GATE_EXPOSURE_NAME || + eventName === CONFIG_EXPOSURE_NAME || + eventName === LAYER_EXPOSURE_NAME + ); }; export const _createGateExposure = ( diff --git a/packages/combo/webpack[js-client+web-analytics].config.js b/packages/combo/webpack[js-client+web-analytics].config.js index c3681657..44fd7db1 100644 --- a/packages/combo/webpack[js-client+web-analytics].config.js +++ b/packages/combo/webpack[js-client+web-analytics].config.js @@ -2,7 +2,7 @@ const { createStatsigWebpackBundle } = require('./statsig-webpack-bundler'); module.exports = createStatsigWebpackBundle({ bundleFile: 'js-client+web-analytics', - maxByteSize: 53_000, + maxByteSize: 55_000, dependencies: [ '@statsig/client-core', '@statsig/js-client', diff --git a/tools/scripts/minifier-name-cache.json b/tools/scripts/minifier-name-cache.json index 4bfbdb96..fa47e581 100644 --- a/tools/scripts/minifier-name-cache.json +++ b/tools/scripts/minifier-name-cache.json @@ -184,7 +184,26 @@ "$_downloadConfigSpecsUrlConfig": "Pn", "$_getSpecs": "Cn", "$_evaluator": "Un", - "$_getOutputs": "Gn" + "$_getOutputs": "Gn", + "$_sessionData": "ti", + "$_events": "ei", + "$_currentSessionID": "ii", + "$_getSessionIdFromClient": "ni", + "$_replayer": "si", + "$_shutdown": "ri", + "$_attemptToStartRecording": "li", + "$_logRecording": "oi", + "$_subscribeToVisibilityChanged": "ui", + "$_onVisibilityChanged": "ai", + "$_onRecordingEvent": "ci", + "$_fastApproxSizeOf": "hi", + "$_bumpSessionIdleTimerAndLogRecording": "di", + "$_logRecordingWithSessionID": "vi", + "$_startTimestamp": "fi", + "$_endTimestamp": "_i", + "$_clickCount": "gi", + "$_stopCallback": "bi", + "$_stopFn": "pi" } } } \ No newline at end of file