title: Single page application tracking with gtag.js Not working
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXX-X"&gt;
  &lt;/script&gt;
  &lt;script&gt;
    window.dataLayer = window.dataLayer || [];
  
    function gtag() {
      dataLayer.push(arguments);
    }
    gtag('js', new Date());
    gtag('config', 'UA-XXXX-X');
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The above gtag google analytics worked on the first time when the page is fully loaded. after site loads, new page content dynamically rather than as full page loads then gtag google analytics is not worked, we tried to update the page_path, modify the config property by specifying a value for the page_path parameter e.g <code>gtag('config', 'GA_TRACKING_ID', {'page_path': '/new-page.html'});</code> but this solution not worked. </p>
  
  <p>We referred to <a href="https://developers.google.com/analytics/devguides/collection/gtagjs/single-page-applications" rel="nofollow noreferrer">this link</a> for the solution.</p>