protected function buildTrackingParamsSession()
    {
        $this->utmSession = $this->getSession('utm_session');
        $this->utmSession->setExpiration('30 minutes');

        if ($this->getParameter('utm_source')) {
            $this->utmSession->utmSource = $this->getParameter('utm_source');
        }
        if ($this->getParameter('utm_medium')) {
            $this->utmSession->utmMedium = $this->getParameter('utm_medium');
        }
        if ($this->getParameter('utm_campaign')) {
            $this->utmSession->utmCampaign = $this->getParameter('utm_campaign');
        }
        if ($this->getParameter('utm_content')) {
            $this->utmSession->utmContent = $this->getParameter('utm_content');
        }

        // store additional parameters
        $this->additionalTrackingSession = $this->getSession('additional_tracking_params');
        $this->additionalTrackingSession->setExpiration('30 minutes');

        if ($this->getParameter('banner_variant')) {
            $this->additionalTrackingSession->bannerVariant = $this->getParameter('banner_variant');
        }
    }
protected function buildTrackingParamsSession()
    {
        $this->utmSession = $this->getSession('utm_session');
        $this->utmSession->setExpiration('30 minutes');

        if ($this->getParameter('utm_source')) {
            $this->utmSession->utmSource = $this->getParameter('utm_source');
        }
        if ($this->getParameter('utm_medium')) {
            $this->utmSession->utmMedium = $this->getParameter('utm_medium');
        }
        if ($this->getParameter('utm_campaign')) {
            $this->utmSession->utmCampaign = $this->getParameter('utm_campaign');
        }
        if ($this->getParameter('utm_content')) {
            $this->utmSession->utmContent = $this->getParameter('utm_content');
        }

        // store additional parameters
        $this->additionalTrackingSession = $this->getSession('additional_tracking_params');
        $this->additionalTrackingSession->setExpiration('30 minutes');

        if ($this->getParameter('banner_variant')) {
            $this->additionalTrackingSession->bannerVariant = $this->getParameter('banner_variant');
        }
    }
protected function buildTrackingParamsSession ( ) { $ this -> utmSession = $ this -> getSession ( 'utm_session' ) ; $ this -> utmSession -> setExpiration ( '30 minutes' ) ; if ( $ this -> getParameter ( 'utm_source' ) ) { $ this -> utmSession -> utmSource = $ this -> getParameter ( 'utm_source' ) ; } if ( $ this -> getParameter ( 'utm_medium' ) ) { $ this -> utmSession -> utmMedium = $ this -> getParameter ( 'utm_medium' ) ; } if ( $ this -> getParameter ( 'utm_campaign' ) ) { $ this -> utmSession -> utmCampaign = $ this -> getParameter ( 'utm_campaign' ) ; } if ( $ this -> getParameter ( 'utm_content' ) ) { $ this -> utmSession -> utmContent = $ this -> getParameter ( 'utm_content' ) ; } // store additional parameters $ this -> additionalTrackingSession = $ this -> getSession ( 'additional_tracking_params' ) ; $ this -> additionalTrackingSession -> setExpiration ( '30 minutes' ) ; if ( $ this -> getParameter ( 'banner_variant' ) ) { $ this -> additionalTrackingSession -> bannerVariant = $ this -> getParameter ( 'banner_variant' ) ; } }
Store sales funnel UTM parameters
and additional tracking parameters to session
Store sales funnel UTM parameters and additional tracking parameters to session