private function getConversionParams($eventEntity, $eventTags)
    {
        $conversionParams = [];
        $singleSnapshot = [];

        $eventDict = [
            ENTITY_ID => $eventEntity->getId(),
            TIMESTAMP => time()*1000,
            UUID => GeneratorUtils::getRandomUuid(),
            KEY => $eventEntity->getKey()
        ];

        if (!is_null($eventTags)) {
            $revenue = EventTagUtils::getRevenueValue($eventTags, $this->_logger);
            if (!is_null($revenue)) {
                $eventDict[EventTagUtils::REVENUE_EVENT_METRIC_NAME] = $revenue;
            }

            $eventValue = EventTagUtils::getNumericValue($eventTags, $this->_logger);
            if (!is_null($eventValue)) {
                $eventDict[EventTagUtils::NUMERIC_EVENT_METRIC_NAME] = $eventValue;
            }

            if (count($eventTags) > 0) {
                $eventDict['tags'] = $eventTags;
            }
        }

        $singleSnapshot[EVENTS] [] = $eventDict;
        $conversionParams [] = $singleSnapshot;

        return $conversionParams;
    }
private function getConversionParams($eventEntity, $eventTags)
    {
        $conversionParams = [];
        $singleSnapshot = [];

        $eventDict = [
            ENTITY_ID => $eventEntity->getId(),
            TIMESTAMP => time()*1000,
            UUID => GeneratorUtils::getRandomUuid(),
            KEY => $eventEntity->getKey()
        ];

        if (!is_null($eventTags)) {
            $revenue = EventTagUtils::getRevenueValue($eventTags, $this->_logger);
            if (!is_null($revenue)) {
                $eventDict[EventTagUtils::REVENUE_EVENT_METRIC_NAME] = $revenue;
            }

            $eventValue = EventTagUtils::getNumericValue($eventTags, $this->_logger);
            if (!is_null($eventValue)) {
                $eventDict[EventTagUtils::NUMERIC_EVENT_METRIC_NAME] = $eventValue;
            }

            if (count($eventTags) > 0) {
                $eventDict['tags'] = $eventTags;
            }
        }

        $singleSnapshot[EVENTS] [] = $eventDict;
        $conversionParams [] = $singleSnapshot;

        return $conversionParams;
    }
private function getConversionParams ( $ eventEntity , $ eventTags ) { $ conversionParams = [ ] ; $ singleSnapshot = [ ] ; $ eventDict = [ ENTITY_ID => $ eventEntity -> getId ( ) , TIMESTAMP => time ( ) * 1000 , UUID => GeneratorUtils :: getRandomUuid ( ) , KEY => $ eventEntity -> getKey ( ) ] ; if ( ! is_null ( $ eventTags ) ) { $ revenue = EventTagUtils :: getRevenueValue ( $ eventTags , $ this -> _logger ) ; if ( ! is_null ( $ revenue ) ) { $ eventDict [ EventTagUtils :: REVENUE_EVENT_METRIC_NAME ] = $ revenue ; } $ eventValue = EventTagUtils :: getNumericValue ( $ eventTags , $ this -> _logger ) ; if ( ! is_null ( $ eventValue ) ) { $ eventDict [ EventTagUtils :: NUMERIC_EVENT_METRIC_NAME ] = $ eventValue ; } if ( count ( $ eventTags ) > 0 ) { $ eventDict [ 'tags' ] = $ eventTags ; } } $ singleSnapshot [ EVENTS ] [ ] = $ eventDict ; $ conversionParams [ ] = $ singleSnapshot ; return $ conversionParams ; }
Helper function to get parameters specific to conversion event.

@param $eventEntity Event representing event entity.
@param $eventTags array Hash representing metadata associated with the event.

@return array Hash representing parameters particular to conversion event.
Helper function to get parameters specific to conversion event .