Welcome to mirror list, hosted at ThFree Co, Russian Federation.

get_standard_context.js « tracking « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c318029323de072e87b0a1277a677e25fe0f3bbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { SNOWPLOW_JS_SOURCE } from './constants';

export default function getStandardContext({ extra = {} } = {}) {
  const { schema, data = {} } = { ...window.gl?.snowplowStandardContext };

  return {
    schema,
    data: {
      ...data,
      source: SNOWPLOW_JS_SOURCE,
      extra: extra || data.extra,
    },
  };
}