title: The Google Analytics API does not find PagePath
body: <p>I am trying to report google analytics data to a database using JAVA, but certain addresses are returning null even if the URL exists.</p>
  
  <p>Example: / catalog / companyX / US / en ----- it finds.</p>
  
  <p>/catalog/companyX/US/en/research ------ he can't find it.</p>
  
  <p>I tried using the filter "ga: pagePath=@/research" and it always returns null. What will be the problem? Because on google analytics site he finds these URLs.</p>
  
  <pre><code>public GetReportsResponse getReport(AnalyticsReporting service) throws IOException {
      // Create the DateRange object.
      DateRange dateRange = new DateRange();
      dateRange.setStartDate("2019-10-06");
      dateRange.setEndDate("2019-10-06");
  
      // Create the Metrics object.
      Metric timeOnPage = new Metric().setExpression("ga:timeOnPage");
      Metric totalEvents = new Metric().setExpression("ga:totalEvents");
      Metric avgSessionDuration = new Metric().setExpression("ga:avgSessionDuration");
      Metric hits = new Metric().setExpression("ga:hits");
  
      // Create the Dimensions object.
      Dimension browser = new Dimension().setName("ga:browser");
      Dimension device = new Dimension().setName("ga:deviceCategory");
      Dimension country = new Dimension().setName("ga:country");
      Dimension page = new Dimension().setName("ga:pagePath");
      Dimension eventCategory = new Dimension().setName("ga:eventCategory");
      Dimension eventAction = new Dimension().setName("ga:eventAction");
      Dimension eventLabel = new Dimension().setName("ga:eventLabel");
      Dimension date = new Dimension().setName("ga:date");
      Dimension pageTitle = new Dimension().setName("ga:pageTitle");
  
      ReportRequest request6 = new ReportRequest().setViewId(VIEW_ID).setDateRanges(Arrays.asList(dateRange))
              .setPageSize(100000)
              .setMetrics(Arrays.asList(totalEvents, hits, avgSessionDuration, timeOnPage))
              .setDimensions(Arrays.asList(date, country, page, browser, device, eventCategory, eventAction,
                      eventLabel, pageTitle));
  
      ArrayList&lt;ReportRequest&gt; requests = new ArrayList&lt;ReportRequest&gt;();
      requests.add(request6);
  
  
      // Create the GetReportsRequest object.
      GetReportsRequest getReport = new GetReportsRequest().setReportRequests(requests);
      // Call the batchGet method.
      GetReportsResponse response = service.reports().batchGet(getReport).execute();
  
      // Return the response.
      return response;
  }
  
  public void printResponse(GetReportsResponse response) {
  
      for (Report report : response.getReports()) {
          ColumnHeader header = report.getColumnHeader();
  
          List&lt;String&gt; dimensionHeaders = header.getDimensions();
          List&lt;MetricHeaderEntry&gt; metricHeaders = header.getMetricHeader().getMetricHeaderEntries();
          List&lt;ReportRow&gt; rows = report.getData().getRows();
  
          if (rows == null) {
              System.out.println("No data found for " + VIEW_ID);
              return;
          }
  
          for (ReportRow row : rows) {
              TableGA tableGA = new TableGA();
              Acessos acessos = new Acessos();
              List&lt;String&gt; dimensions = row.getDimensions();
              List&lt;DateRangeValues&gt; metrics = row.getMetrics();
              if (row.getDimensions() != null) {
  
                  for (int i = 0; i &lt; dimensionHeaders.size() &amp;&amp; i &lt; dimensions.size(); i++) {
                      switch (dimensionHeaders.get(i)) {
                      case "ga:browser":
                          tableGA.setBrowser(dimensions.get(i));
  
                          break;
                      case "ga:deviceCategory":
                          tableGA.setDevice(dimensions.get(i));
  
                          break;
                      case "ga:country":
                          tableGA.setCountry(dimensions.get(i));
  
                          break;
                      case "ga:pagePath":
                          tableGA.setPage(dimensions.get(i));
  
                          break;
                      case "ga:eventCategory":
                          tableGA.setEventCategory(dimensions.get(i));
  
                          break;
                      case "ga:eventAction":
                          tableGA.setEventAction(dimensions.get(i));
  
                          break;
                      case "ga:eventLabel":
                          tableGA.setEventLabel(dimensions.get(i));
  
                          break;
                      case "ga:date":
                          SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
                          Date convertedCurrentDate = null;
                          String year = dimensions.get(i).substring(0, 4);
                          String month = dimensions.get(i).substring(4, 6);
                          String day = dimensions.get(i).substring(6, 8);
                          String date = year + "-" + month + "-" + day;
                          try {
                              convertedCurrentDate = simpleDateFormat.parse(date);
                          } catch (ParseException e) {
                              e.printStackTrace();
                          }
                          tableGA.setActualDate(convertedCurrentDate);
  
                          break;
                      case "ga:pageTitle":
                          tableGA.setPageTitle(dimensions.get(i));
  
                          break;
                      }
                  }
              }
              for (int j = 0; j &lt; metrics.size(); j++) {
                  DateRangeValues values = metrics.get(j);
                  for (int k = 0; k &lt; values.getValues().size() &amp;&amp; k &lt; metricHeaders.size(); k++) {
                      switch (metricHeaders.get(k).getName()) {
                      case "ga:timeOnPage":
                          tableGA.setTimeOnPage(Double.parseDouble(values.getValues().get(k)));
                          break;
                      case "ga:totalEvents":
                          tableGA.setTotalEvents(Integer.parseInt(values.getValues().get(k)));
                          break;
                      case "ga:avgSessionDuration":
                          tableGA.setAvgSessionDuration(Double.parseDouble(values.getValues().get(k)));
  
                          break;
                      case "ga:hits":
                          tableGA.setHits(Integer.parseInt(values.getValues().get(k)));
  
                          break;
                      }
                  }
  
              }
              gaService.save(tableGA);
              System.out.println(tableGA.getPage());
              gaService.save(acessos);
          }
      }
  }
  </code></pre>