// In Site Code (make sure Dev Mode is enabled)
import wixLocation from 'wix-location';
import { session } from 'wix-storage';
$w.onReady(() => {
// Check for the gclid parameter in the URL
const gclid = wixLocation.query["gclid"];
if (gclid) {
// Store it in session storage (persists during the visitor’s session)
session.setItem("gclid", gclid);
console.log("gclid captured:", gclid);
}
});