@@ -436,15 +436,15 @@ public void setDownloadUrl(URL downloadUrl){
436436 * cart update or an ecommerce order.
437437 */
438438 public void enableEcommerce (){
439- setGoalId ("0" );
439+ setGoalId (0 );
440440 }
441441
442442 /**
443443 * Verifies that Ecommerce has been enabled for the request. Will throw an
444444 * {@link IllegalStateException} if not.
445445 */
446446 public void verifyEcommerceEnabled (){
447- if (! "0" . equals ( getGoalId ()) ){
447+ if (getGoalId () == null || getGoalId () != 0 ){
448448 throw new IllegalStateException ("GoalId must be \" 0\" . Try calling enableEcommerce first before calling this method." );
449449 }
450450 }
@@ -680,16 +680,16 @@ public void setEventValue(Number eventValue){
680680 * Get the goal id
681681 * @return the goal id
682682 */
683- public String getGoalId (){
684- return (String )getParameter (GOAL_ID );
683+ public Integer getGoalId (){
684+ return (Integer )getParameter (GOAL_ID );
685685 }
686686
687687 /**
688688 * Set the goal id. If specified, the tracking request will trigger a
689689 * conversion for the goal of the website being tracked with this id.
690690 * @param goalId the goal id to set
691691 */
692- public void setGoalId (String goalId ){
692+ public void setGoalId (Integer goalId ){
693693 setParameter (GOAL_ID , goalId );
694694 }
695695
@@ -1052,8 +1052,8 @@ public String getSearchCategory(){
10521052 }
10531053
10541054 /**
1055- * When <strong>Query</strong> is specified, you can optionally specify a search category
1056- * with this parameter .
1055+ * Specify a search category with this parameter. SearchQuery must first be
1056+ * set .
10571057 * @param searchCategory the search category to set
10581058 */
10591059 public void setSearchCategory (String searchCategory ){
@@ -1089,10 +1089,10 @@ public Long getSearchResultsCount(){
10891089 }
10901090
10911091 /**
1092- * When <strong>Query</strong> is specified, we also recommend to set the
1092+ * We recommend to set the
10931093 * search count to the number of search results displayed on the results page.
10941094 * When keywords are tracked with {@code Search Results Count=0} they will appear in
1095- * the "No Result Search Keyword" report.
1095+ * the "No Result Search Keyword" report. SearchQuery must first be set.
10961096 * @param searchResultsCount the search results count to set
10971097 */
10981098 public void setSearchResultsCount (Long searchResultsCount ){
0 commit comments