title: How do I set up Google Analytics Event Tracking for Goals?
body: <p>I got the site tracking code from </p>
  
  <p><a href="https://analytics.google.com/analytics/web/?authuser=1#management/Settings/" rel="nofollow noreferrer">https://analytics.google.com/analytics/web/?authuser=1#management/Settings/</a></p>
  
  <p>Which looks like</p>
  
  <pre><code>&lt;!-- Global site tag (gtag.js) - Google Analytics --&gt;
  &lt;script async src="https://www.googletagmanager.com/gtag/js?id=UA-9999999"&gt;&lt;/script&gt;
    ...
    gtag('js', new Date());
    gtag('config', 'UA-99999999999');
  </code></pre>
  
  <p>This page uses the function <code>ga</code> which doesn't appear to exist.</p>
  
  <p><a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/events" rel="nofollow noreferrer">https://developers.google.com/analytics/devguides/collection/analyticsjs/events</a></p>
  
  <p>This page mentions Google Tag Manager</p>
  
  <p><a href="https://support.google.com/analytics/answer/1136960/?hl=en&amp;authuser=1" rel="nofollow noreferrer">https://support.google.com/analytics/answer/1136960/?hl=en&amp;authuser=1</a></p>
  
  <p>But the code from Google Tag Manager is completely different, with different account numbers. It has 2 code snippets, and looks like</p>
  
  <pre><code>&lt;!-- Google Tag Manager --&gt;
  &lt;script&gt;(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  ...
  </code></pre>
  
  <p>And</p>
  
  <pre><code>&lt;!-- Google Tag Manager (noscript) --&gt;
  &lt;noscript&gt;&lt;iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXX
  </code></pre>
  
  <p>I tried to follow the docs at</p>
  
  <p><a href="https://support.google.com/tagmanager/answer/6106716#FormSubmit" rel="nofollow noreferrer">https://support.google.com/tagmanager/answer/6106716#FormSubmit</a></p>
  
  <p>But the following fields did not exist.</p>
  
  <blockquote>
    <p>Category: Forms <br>
    Action: Submit <br>
    Label: Lead Gen - {{Form ID}}</p>
  </blockquote>
  
  <p>I tested a form submission, but it didn't appear to send any form event to Google Analytics.  Also, I don't see how to link the event to the goal defined in Google Analytics.</p>
  
  <p><a href="https://analytics.google.com/analytics/web/?authuser=1#management/Settings" rel="nofollow noreferrer">https://analytics.google.com/analytics/web/?authuser=1#management/Settings</a></p>
  
  <p>The goal detail has 'action' equal to 'register', but there was absolutely nothing in Google Tag Manager allowing me to define a Category, Action, Label, or Value.</p>