Skip to content

Commit

Permalink
Allow context overrides through options argument (#1149)
Browse files Browse the repository at this point in the history
  • Loading branch information
huoxito authored Nov 28, 2024
1 parent 93ce6c2 commit d071368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/jitsu-js/src/analytics-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ function adjustPayload(
properties.path = fixPath(urlPath(targetUrl));
}

const customContext = payload.properties?.context || {};
const customContext = payload.properties?.context || payload.options?.context || {};
delete payload.properties?.context;
const referrer = runtime.referrer();
const context: AnalyticsClientEvent["context"] = {
Expand Down

0 comments on commit d071368

Please sign in to comment.