{"ast":null,"code":"/**\n * Sends network call using Google Analytic's gtag function\n * https://developers.google.com/analytics/devguides/collection/gtagjs/events#send_events\n * \n * @param name {string} - The value that will appear as the event action in Google Analytics Event reports.\n * @param eventCategory {string} - The category of the event.\n * @param eventLabel {string} - The label of the event.\n * @param [value] {number} - An optional non-negative integer that will appear as the event value.\n */\nexport var trackEvent = function trackEvent(name, eventCategory, eventLabel, value) {\n  window.gtag && window.gtag('event', name, Object.assign({\n    'event_category': eventCategory,\n    'event_label': eventLabel\n  }, value >= 0 && {\n    value: value\n  }));\n};","map":{"version":3,"names":["trackEvent","name","eventCategory","eventLabel","value","window","gtag"],"sources":["/Users/ausulliv/repos/temp/patternfly-react/node_modules/@patternfly/documentation-framework/helpers/trackEvent.js"],"sourcesContent":["/**\n * Sends network call using Google Analytic's gtag function\n * https://developers.google.com/analytics/devguides/collection/gtagjs/events#send_events\n * \n * @param name {string} - The value that will appear as the event action in Google Analytics Event reports.\n * @param eventCategory {string} - The category of the event.\n * @param eventLabel {string} - The label of the event.\n * @param [value] {number} - An optional non-negative integer that will appear as the event value.\n */\nexport const trackEvent = ( name, eventCategory, eventLabel, value) => {\n  window.gtag && window.gtag('event', name, {\n    'event_category': eventCategory,\n    'event_label': eventLabel,\n    // Optional non-negative integer\n    ...(value >= 0 && {value})\n  });\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAAEC,IAAF,EAAQC,aAAR,EAAuBC,UAAvB,EAAmCC,KAAnC,EAA6C;EACrEC,MAAM,CAACC,IAAP,IAAeD,MAAM,CAACC,IAAP,CAAY,OAAZ,EAAqBL,IAArB;IACb,kBAAkBC,aADL;IAEb,eAAeC;EAFF,GAITC,KAAK,IAAI,CAAT,IAAc;IAACA,KAAK,EAALA;EAAD,CAJL,EAAf;AAMD,CAPM"},"metadata":{},"sourceType":"module"}