@@ -54,7 +54,7 @@ public class EventBuilder {
5454 private static final String GOAL_NAME_PARAM = "n" ;
5555 private static final String PPID_PARAM = "p" ;
5656 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" ;
5858 private static final String SEGMENT_PARAM_PREFIX = "s" ;
5959 private static final String SOURCE_PARAM = "src" ;
6060 private static final String TIME_PARAM = "time" ;
@@ -89,8 +89,8 @@ public Map<String, String> createConversionParams(@Nonnull ProjectConfig project
8989 @ Nonnull String eventId ,
9090 @ Nonnull String eventName ,
9191 @ 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 );
9494 }
9595
9696 private Map <String , String > createConversionParams (@ Nonnull ProjectConfig projectConfig ,
@@ -99,7 +99,7 @@ private Map<String, String> createConversionParams(@Nonnull ProjectConfig projec
9999 @ Nonnull String eventId ,
100100 @ Nonnull String eventName ,
101101 @ Nonnull Map <String , String > attributes ,
102- @ CheckForNull Long revenue ) {
102+ @ CheckForNull Long eventValue ) {
103103
104104 Map <String , String > requestParams = new HashMap <String , String >();
105105 List <Experiment > addedExperiments =
@@ -110,7 +110,7 @@ private Map<String, String> createConversionParams(@Nonnull ProjectConfig projec
110110 }
111111
112112 addCommonRequestParams (requestParams , projectConfig , userId , attributes );
113- addConversionGoal (requestParams , projectConfig , eventId , eventName , revenue );
113+ addConversionGoal (requestParams , projectConfig , eventId , eventName , eventValue );
114114
115115 return requestParams ;
116116 }
@@ -256,15 +256,15 @@ private void addImpressionGoal(Map<String, String> requestParams, Experiment act
256256 * @param projectConfig the project config
257257 * @param eventId the goal being converted on
258258 * @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
260260 */
261261 private void addConversionGoal (Map <String , String > requestParams , ProjectConfig projectConfig , String eventId ,
262- String eventName , @ CheckForNull Long revenue ) {
262+ String eventName , @ CheckForNull Long eventValue ) {
263263
264264 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 ());
268268 EventType revenueGoal = projectConfig .getEventNameMapping ().get (EventType .TOTAL_REVENUE_GOAL_KEY );
269269 if (revenueGoal != null ) {
270270 eventIds = eventId + "," + revenueGoal .getId ();
0 commit comments