@@ -38,22 +38,19 @@ function getHTTPVerb(configObj) {
38
38
* @param {string } options.clientVersion The version of the client
39
39
* @param {Object } options.configObj Object representing project configuration, including datafile information and mappings for quick lookup
40
40
* @param {string } options.userId ID for user
41
- * @param {string } options.sessionId ID for user's current session
42
41
* @return {Object } Common params with properties that are used in both conversion and impression events
43
42
*/
44
43
function getCommonEventParams ( options ) {
45
44
var attributes = options . attributes ;
46
45
var configObj = options . configObj ;
47
46
var userId = options . userId ;
48
- var sessionId = options . sessionId || null ;
49
47
50
48
if ( configObj . version === enums . NEW_OPTIMIZELY_VERSION ) {
51
49
var commonParams = {
52
50
accountId : configObj . accountId ,
53
51
projectId : configObj . projectId ,
54
52
revision : configObj . revision ,
55
53
visitorId : userId ,
56
- sessionId : sessionId ,
57
54
timestamp : Math . round ( new Date ( ) . getTime ( ) ) ,
58
55
isGlobalHoldback : false ,
59
56
userFeatures : [ ] ,
@@ -106,7 +103,6 @@ module.exports = {
106
103
* @param {string } options.experimentKey Experiment for which impression needs to be recorded
107
104
* @param {string } options.userId ID for user
108
105
* @param {string } options.variationId ID for variation which would be presented to user
109
- * @param {string } options.sessionId ID for user's current session
110
106
* @return {Object } Params to be used in impression event logging endpoint call
111
107
*/
112
108
getImpressionEvent : function ( options ) {
@@ -140,11 +136,10 @@ module.exports = {
140
136
* @param {string } options.clientVersion The version of the client
141
137
* @param {Object } options.configObj Object representing project configuration, including datafile information and mappings for quick lookup
142
138
* @param {string } options.eventKey Event key representing the event which needs to be recorded
143
- * @param {string } options.eventValue Value associated with the event. Can be used to represent revenue in cents
139
+ * @param {Object } options.eventTags Object with event-specific tags
144
140
* @param {string } options.userId ID for user
145
141
* @param {Array } options.variationIds Experiment variation ID(s) which are being tracked
146
142
* @param {Array } options.validExperimentKeysForEvent Array of valid experiment keys that are associated with the event key
147
- * @param {string } options.sessionId ID for user's current session
148
143
* @return {Object } Params to be used in conversion event logging endpoint call
149
144
*/
150
145
getConversionEvent : function ( options ) {
@@ -159,7 +154,7 @@ module.exports = {
159
154
160
155
var conversionEventParams = newOptimizelyEventBuilder . getConversionEventParams ( options . configObj ,
161
156
options . eventKey ,
162
- options . eventValue ,
157
+ options . eventTags ,
163
158
options . variationIds ,
164
159
options . validExperimentKeysForEvent ) ;
165
160
conversionEvent . params = _ . assignIn ( commonParams , conversionEventParams ) ;
@@ -169,7 +164,7 @@ module.exports = {
169
164
170
165
var conversionEventParams = classicOptimizelyEventBuilder . getConversionGoalParams ( options . configObj ,
171
166
options . eventKey ,
172
- options . eventValue ) ;
167
+ options . eventTags && options . eventTags . revenue ) ;
173
168
var experimentVariationParams = classicOptimizelyEventBuilder . getExperimentVariationParams ( options . configObj ,
174
169
options . variationIds ,
175
170
options . validExperimentKeysForEvent ) ;
0 commit comments