1
1
/**
2
- * Copyright 2016-2018 , Optimizely
2
+ * Copyright 2016-2019 , Optimizely
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -57,6 +57,7 @@ function getCommonEventParams(options) {
57
57
client_name : options . clientEngine ,
58
58
client_version : options . clientVersion ,
59
59
anonymize_ip : anonymize_ip ,
60
+ enrich_decisions : true ,
60
61
} ;
61
62
62
63
// Omit attribute values that are not supported by the log endpoint.
@@ -115,26 +116,14 @@ function getImpressionEventParams(configObj, experimentId, variationId) {
115
116
* @param {Object } configObj Object representing project configuration
116
117
* @param {string } eventKey Event key representing the event which needs to be recorded
117
118
* @param {Object } eventTags Values associated with the event.
118
- * @param {Array } experimentsToVariationMap Map of experiment IDs to bucketed variation IDs
119
119
* @param {Object } logger Logger object
120
120
* @return {Object } Conversion event params
121
121
*/
122
- function getVisitorSnapshot ( configObj , eventKey , eventTags , experimentsToVariationMap , logger ) {
122
+ function getVisitorSnapshot ( configObj , eventKey , eventTags , logger ) {
123
123
var snapshot = {
124
- decisions : [ ] ,
125
124
events : [ ]
126
125
} ;
127
126
128
- fns . forOwn ( experimentsToVariationMap , function ( variationId , experimentId ) {
129
- var decision = {
130
- campaign_id : projectConfig . getLayerId ( configObj , experimentId ) ,
131
- experiment_id : experimentId ,
132
- variation_id : variationId ,
133
- } ;
134
-
135
- snapshot . decisions . push ( decision ) ;
136
- } ) ;
137
-
138
127
var eventDict = {
139
128
entity_id : projectConfig . getEventId ( configObj , eventKey ) ,
140
129
timestamp : fns . currentTimestamp ( ) ,
@@ -199,7 +188,6 @@ module.exports = {
199
188
* @param {Object } options.configObj Object representing project configuration, including datafile information and mappings for quick lookup
200
189
* @param {string } options.eventKey Event key representing the event which needs to be recorded
201
190
* @param {Object } options.eventTags Object with event-specific tags
202
- * @param {Object } options.experimentsToVariationMap Map of experiment IDs to bucketed variation IDs
203
191
* @param {Object } options.logger Logger object
204
192
* @param {string } options.userId ID for user
205
193
* @return {Object } Params to be used in conversion event logging endpoint call
@@ -215,7 +203,6 @@ module.exports = {
215
203
var snapshot = getVisitorSnapshot ( options . configObj ,
216
204
options . eventKey ,
217
205
options . eventTags ,
218
- options . experimentsToVariationMap ,
219
206
options . logger ) ;
220
207
221
208
commonParams . visitors [ 0 ] . snapshots = [ snapshot ] ;
0 commit comments