title: Passing multiple dimensions to google analytics reporting API v4 with javaScript
body: <p>How would I go about passing multiple dimensions when executing a Google Analytics Reporting API v4 Query. For example how would I pass ga:dimension7 in addition to ga:dimension5 in my dimensions?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function queryReports() {
          gapi.client.request({
              path: '/v4/reports:batchGet',
              root: 'https://analyticsreporting.googleapis.com/',
              method: 'POST',
              body: {
                  reportRequests: [
                      {
                          viewId: VIEW_ID,
                          dateRanges: [
                              {
                                  startDate: '7daysAgo',
                                  endDate: 'today'
                              }
                          ],
                          dimensions: [
                              {
                                  name: 'ga:dimension5'
                              }
                          ],
                          metrics: [
                              {
                                  expression: 'ga:totalEvents',
                                  alias: 'orderNumber'
                              }
                          ],
                          filtersExpression: 'ga:eventCategory==xxx,ga:eventAction==xxx',
                          filtersExpression: 'ga:dimension5=~\^\\\[.*\\\]\$'
                      }
                  ]
              }
          }).then(displayResults, console.error.bind(console));
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I separate them with comma,then I have the error below:</p>
  
  <p><img src="https://i.stack.imgur.com/uLRZM.png" alt="wrong message"></p>
  
  <p>Any idea?</p>