title: Analytics on a bootstrap modal with pageview and time related metrics
body: <p>I have a page (let's name it the overview page) with a lot of images of projects that on a click open a bootstrap (v3) modal with more info about that project. Each project also has its own page (single page).</p>
  
  <p>I'd like to track pageviews for the projects when a user opens the modal with Google (universal) analytics. Now I'm planning on doing this by adding the following code to each link on the overview page:</p>
  
  <pre><code>onClick="ga('send','pageview','/url-to-project-page');"
  </code></pre>
  
  <p>I expect this works fine since I've seen this method in other posts regarding tracking pageviews on AJAX calls.</p>
  
  <p>But I'm wondering how this affects time related metrics like average time on page, since analytics can't know when the modal is closed (the same as leaving a single page).</p>
  
  <p>Does anyone know if the metrics will be comparable to a normal single page view, or will some parts of the metrics (I'm guessing time related metics) be off because analytics isn't able to track them?</p>