Skip to content

Instantly share code, notes, and snippets.

View VariableVic's full-sized avatar

Victor Gerbrands VariableVic

View GitHub Profile
@VariableVic
VariableVic / google-analytics.ts
Last active November 11, 2024 19:47
Medusa -> Google Analytics 4 server side tracking example
import { TransactionBaseService } from "@medusajs/medusa";
import {
ConsentSettings,
EventItem,
JSONPostBody,
} from "../types/google-analytics";
const { subtle } = require("crypto").webcrypto;