title: Google Analytics UserID Tracking Code
body: <p>I'm setting up UserID tracking in Google Analytics. <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id" rel="nofollow">Google's documentation</a> displays this piece of code to push UserIDs into analytics:</p>
  
  <pre><code>ga('create', 'UA-XXXX-Y', { 'userId': 'USER_ID' });
  ga('send', 'pageview');
  </code></pre>
  
  <p>However, when I'm in my Google Analytic's settings area, it displays the following piece of code to include UserIDs.</p>
  
  <pre><code>ga(‘set’, ‘&amp;uid’, {{USER_ID}}); // Set the user ID using signed-in user_id.
  </code></pre>
  
  <p>What is the difference between set and create? Do they both achieve the same result?</p>