private function getMethodData(MethodInterface $method, $userId)
    {
        $data = $method->getArguments();
        $data['action'] = $method->getName();
        $data['secret'] = $this->getWriteKey();

        // Don't overwrite the userId if it it is present.
        if (!isset($data['userId']) && !isset($data['from'])) {
            $data['userId'] = $userId;
        }

        return $data;
    }