@@ -54,7 +54,7 @@ public class EventBuilder {
54
54
private static final String GOAL_NAME_PARAM = "n" ;
55
55
private static final String PPID_PARAM = "p" ;
56
56
private static final String PROJECT_ID_PARAM = "a" ;
57
- private static final String REVENUE_PARAM = "v" ;
57
+ private static final String EVENT_VALUE_PARAM = "v" ;
58
58
private static final String SEGMENT_PARAM_PREFIX = "s" ;
59
59
private static final String SOURCE_PARAM = "src" ;
60
60
private static final String TIME_PARAM = "time" ;
@@ -89,8 +89,8 @@ public Map<String, String> createConversionParams(@Nonnull ProjectConfig project
89
89
@ Nonnull String eventId ,
90
90
@ Nonnull String eventName ,
91
91
@ Nonnull Map <String , String > attributes ,
92
- long revenue ) {
93
- return createConversionParams (projectConfig , bucketer , userId , eventId , eventName , attributes , (Long )revenue );
92
+ long eventValue ) {
93
+ return createConversionParams (projectConfig , bucketer , userId , eventId , eventName , attributes , (Long )eventValue );
94
94
}
95
95
96
96
private Map <String , String > createConversionParams (@ Nonnull ProjectConfig projectConfig ,
@@ -99,7 +99,7 @@ private Map<String, String> createConversionParams(@Nonnull ProjectConfig projec
99
99
@ Nonnull String eventId ,
100
100
@ Nonnull String eventName ,
101
101
@ Nonnull Map <String , String > attributes ,
102
- @ CheckForNull Long revenue ) {
102
+ @ CheckForNull Long eventValue ) {
103
103
104
104
Map <String , String > requestParams = new HashMap <String , String >();
105
105
List <Experiment > addedExperiments =
@@ -110,7 +110,7 @@ private Map<String, String> createConversionParams(@Nonnull ProjectConfig projec
110
110
}
111
111
112
112
addCommonRequestParams (requestParams , projectConfig , userId , attributes );
113
- addConversionGoal (requestParams , projectConfig , eventId , eventName , revenue );
113
+ addConversionGoal (requestParams , projectConfig , eventId , eventName , eventValue );
114
114
115
115
return requestParams ;
116
116
}
@@ -256,15 +256,15 @@ private void addImpressionGoal(Map<String, String> requestParams, Experiment act
256
256
* @param projectConfig the project config
257
257
* @param eventId the goal being converted on
258
258
* @param eventName the name of the custom event goal
259
- * @param revenue the optional revenue for the event
259
+ * @param eventValue the optional event value for the event
260
260
*/
261
261
private void addConversionGoal (Map <String , String > requestParams , ProjectConfig projectConfig , String eventId ,
262
- String eventName , @ CheckForNull Long revenue ) {
262
+ String eventName , @ CheckForNull Long eventValue ) {
263
263
264
264
String eventIds = eventId ;
265
- if (revenue != null ) {
266
- requestParams . put ( REVENUE_PARAM , revenue . toString ());
267
- // to ensure that the revenue value is also included in "total revenue", pull in the default revenue goal
265
+ if (eventValue != null ) {
266
+ // record the event value for the total revenue goal
267
+ requestParams . put ( EVENT_VALUE_PARAM , eventValue . toString ());
268
268
EventType revenueGoal = projectConfig .getEventNameMapping ().get (EventType .TOTAL_REVENUE_GOAL_KEY );
269
269
if (revenueGoal != null ) {
270
270
eventIds = eventId + "," + revenueGoal .getId ();
0 commit comments