The service identifier to validate the stored GAD data against.
The parsed GAD parameters object if valid, or null if expired, mismatched, or invalid.
import getGADParams from '@/functions/get-gad-params';
import { UTM_SERVICES_ENUM } from '@/constants/utm';
const gad = getGADParams(UTM_SERVICES_ENUM.INSURANCE_BODY);
if (gad) {
console.log('Valid GAD parameters related to insurance body service:', gad);
} else {
console.log('No valid GAD data found.');
}
Retrieves and validates stored GAD parameters for a specific service.
This function reads a serialized UTM object from
sessionStorageunder the key defined byGAD_STORAGE_KEY. It ensures that:expirytimestamp).serviceIf any of these checks fail, the function clears the stored data and returns
null.