public function addSetCookieHeader(FilterResponseEvent $event)
    {
        if (!$this->targetGroupStore->hasChangedTargetGroup()
            || $event->getRequest()->getPathInfo() === $this->targetGroupUrl
        ) {
            return;
        }

        $response = $event->getResponse();

        $response->headers->setCookie(
            new Cookie(
                $this->targetGroupCookie,
                $this->targetGroupStore->getTargetGroupId(true),
                AudienceTargetingCacheListener::TARGET_GROUP_COOKIE_LIFETIME
            )
        );

        $response->headers->setCookie(
            new Cookie(
                $this->visitorSessionCookie,
                time()
            )
        );
    }