• Extracts UTM (Urchin Tracking Module) parameters from the current page URL and stores them in sessionStorage for later use.

    This function parses the URL query parameters and collects standard UTM fields: gad_source, gad_campaignid, gbraid, and gclid.

    If at least one UTM parameter exists, it constructs a UTM object that includes:

    • The extracted UTM parameters.
    • The current page’s pathname (landingPage).
    • The device type (from getDeviceType).
    • An expiration timestamp based on GAD_EXPIRY_HOURS.

    The resulting object is serialized and saved in sessionStorage under the key defined by GAD_STORAGE_KEY. This allows subsequent calls (e.g. via getGADParams) to retrieve and validate UTM data associated with the user’s session.

    Returns void

    Nothing is returned; the function has a side effect of writing to sessionStorage.

    This function performs no action if no UTM parameters are present in the current URL.

    import storeGADParams from '@/utils/storeGADParams';

    // Example: URL = https://example.com/?utm_source=google&utm_campaign=winter_sale
    storeGADParams();
    // Stores something like:
    // {
    // utm_source: 'google',
    // utm_campaign: 'winter_sale',
    // landingPage: '/home',
    // deviceType: 'desktop',
    // expiry: 1730564030000
    // }