packages/optimizely-sdk/lib/core/event_builder/index.js
function(options) {
    var conversionEvent = {
      httpVerb: HTTP_VERB,
    };

    var commonParams = getCommonEventParams(options);
    conversionEvent.url = ENDPOINT;

    var snapshot = getVisitorSnapshot(options.configObj,
                                            options.eventKey,
                                            options.eventTags,
                                            options.logger);

    commonParams.visitors[0].snapshots = [snapshot];
    conversionEvent.params = commonParams;

    return conversionEvent;
  }
function(options) {
    var conversionEvent = {
      httpVerb: HTTP_VERB,
    };

    var commonParams = getCommonEventParams(options);
    conversionEvent.url = ENDPOINT;

    var snapshot = getVisitorSnapshot(options.configObj,
                                            options.eventKey,
                                            options.eventTags,
                                            options.logger);

    commonParams.visitors[0].snapshots = [snapshot];
    conversionEvent.params = commonParams;

    return conversionEvent;
  }
function ( options ) { var conversionEvent = { httpVerb : HTTP_VERB , } ; var commonParams = getCommonEventParams ( options ) ; conversionEvent . url = ENDPOINT ; var snapshot = getVisitorSnapshot ( options . configObj , options . eventKey , options . eventTags , options . logger ) ; commonParams . visitors [ 0 ] . snapshots = [ snapshot ] ; conversionEvent . params = commonParams ; return conversionEvent ; }
Create conversion event params to be sent to the logging endpoint
@param  {Object} options                           Object containing values needed to build conversion event
@param  {Object} options.attributes                Object representing user attributes and values which need to be recorded
@param  {string} options.clientEngine              The client we are using: node or javascript
@param  {string} options.clientVersion             The version of the client
@param  {Object} options.configObj                 Object representing project configuration, including datafile information and mappings for quick lookup
@param  {string} options.eventKey                  Event key representing the event which needs to be recorded
@param  {Object} options.eventTags                 Object with event-specific tags
@param  {Object} options.logger                    Logger object
@param  {string} options.userId                    ID for user
@return {Object}                                   Params to be used in conversion event logging endpoint call
Create conversion event params to be sent to the logging endpoint