MCPcopy
hub / github.com/TransformerOptimus/SuperAGI / sendGAEvent

Function sendGAEvent

gui/utils/utils.js:552–565  ·  view source on GitHub ↗
(client, eventName, params)

Source from the content-addressed store, hash-verified

550}
551
552export const sendGAEvent = async (client, eventName, params) => {
553 const measurement_id = analyticsMeasurementId();
554 const api_secret = analyticsApiSecret();
555 await fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurement_id}&api_secret=${api_secret}`, {
556 method: "POST",
557 body: JSON.stringify({
558 client_id: client,
559 events: [{
560 name: eventName,
561 params: params
562 }]
563 })
564 });
565}

Callers 1

_app.jsFile · 0.90

Calls 2

analyticsMeasurementIdFunction · 0.90
analyticsApiSecretFunction · 0.90

Tested by

no test coverage detected