title: googleapis npm module "analytics is not a function"
body: <p>I am trying integrate google analytics API "server to server"  in Node.js.
  I am following this <a href="http://www.bentedder.com/server-to-server-authorization-for-google-analytics-api-with-node-js/" rel="nofollow noreferrer">Server-to-server authorization for Google Analytics API with Node.js</a> documents right now. tried a lot more.</p>
  
  <p>What currently I am stuck with is a Error </p>
  
  <pre><code>var analytics = google.analytics('v3');
                     ^
  TypeError: google.analytics is not a function
      at Object.&lt;anonymous&gt; (/server/services/data_resources/analytics/analyticsTest3.js:9:24)
      at Module._compile (module.js:652:30)
      at Object.Module._extensions..js (module.js:663:10)
      at Module.load (module.js:565:32)
      at tryModuleLoad (module.js:505:12)
      at Function.Module._load (module.js:497:3)
      at Function.Module.runMain (module.js:693:10)
      at startup (bootstrap_node.js:191:16)
      at bootstrap_node.js:612:3
  </code></pre>
  
  <p>Just can't understand what to do next</p>
  
  <p>I have installed this module by</p>
  
  <pre><code>npm install googleapis --save
  </code></pre>
  
  <p>and nodejs version</p>
  
  <pre><code>node --version
  v8.11.3
  </code></pre>
  
  <p>npm version is</p>
  
  <pre><code>npm --version
  6.3.0
  </code></pre>