/** * Extract referral code from GET-variable or cookie and save it into registry. * * @param \Magento\Framework\App\FrontControllerInterface $subject * @param \Magento\Framework\App\RequestInterface $request */ public function beforeDispatch(\Magento\Framework\App\FrontControllerInterface $subject, \Magento\Framework\App\RequestInterface $request) { $reqCode = $request->getParam(static::REQ_REFERRAL); $this->_toolReferralCode->processHttpRequest($reqCode); }