title: How to populate google analytics UTM variables manually
body: <p>I want to be able to set the UTM variables manually</p>
  
  <p>So instead of having a webpage </p>
  
  <p><a href="http://mysite.net/index.html?utm_source=source&amp;utm_medium=inbound&amp;utm_campaign=campname" rel="nofollow">http://mysite.net/index.html?utm_source=source&amp;utm_medium=inbound&amp;utm_campaign=campname</a></p>
  
  <p>I want to be able to set these with javascript. Looking through the documentation I couldn't find any set methods for these, only the set key methods. </p>
  
  <p><a href="https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCampaigns" rel="nofollow">https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCampaigns</a></p>
  
  <p>I have also tried </p>
  
  <pre><code>_gaq.push(['_trackPageview', '/index.html?utm_source=source&amp;utm_medium=inbound&amp;utm_campaign=campname']);
  </code></pre>
  
  <p>Although as far as I can tell this doesn't work. The only way I can now see of getting this to work will be to set these using a hash value: </p>
  
  <p>ie:
  <a href="http://mysite.net/index.html#utm_source=In+House&amp;utm_medium=email&amp;utm_campaign=Fall+email+offers" rel="nofollow">http://mysite.net/index.html#utm_source=In+House&amp;utm_medium=email&amp;utm_campaign=Fall+email+offers</a></p>
  
  <pre><code>_gaq.push(['_setAllowAnchor', true]); 
  </code></pre>
  
  <p>Is there a better way? </p>