title: Hubspot and Google Analytics - Pass session source and medium information
body: <p>I’m trying to pass session source and medium information into HubSpot so that if a form is filled out / some other conversion event happens, I can tell where that specific session started.</p>
  <p>From the HubSpot side, this should be a two-field solution — e.g. the session and medium get passed across into fields that update with each new visit. If a form gets filled out, it will copy the session and medium data across to more permanent fields.</p>
  <p>The end result of this process will mean that I’ll be able to say “we got 100 people to download our ebook this month. 8 came from email, 70 came from organic search, and 22 came from social media”.</p>
  <p>All I can say right now is “we got 100 people to download our ebook. I have no idea where they’re from.”</p>
  <p>I would like to know if this would be possible to do using Google Analytics and Hubspot as well as some script.</p>
  <p>Upon researching I have found these two scripts that may be relevant to this:
  <br>
  <a href="https://github.com/troyfawkes/dgacquisition" rel="nofollow noreferrer">https://github.com/troyfawkes/dgacquisition</a>
  <br>
  and this:
  <br>
  <a href="http://sbjs.rocks/#/" rel="nofollow noreferrer">http://sbjs.rocks/#/</a>
  <br></p>
  <p>Any help would be greatly appreciated.</p>