title: How to track js based links in Google Analytics using the new gtag code
body: <p>I previously tracked clicks to open tabs / modals etc in my google analytics.  I have since had to change to the new gTag code and js links are now not being tracked.  How can I fix this?</p>
  
  <pre><code>&lt;script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxx-5"&gt;&lt;/script&gt;
  &lt;script&gt;
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
      // line below previously pushed js links events
      gtag('event', 'pageview', { 'page': location.pathname + location.search + location.hash});
      gtag('config', 'UA-xxxxxxx-5', {
    'linker': {
      'domains': ['example.org.au']
    }
  });
  </code></pre>