After a lots of hours investigating, I figured that if no referer is sent to the hubspot servers when tracking with JS code, then the source is always OFFLINE no matter what. If I use the form api to create the contact laster and pass the hs_context correctly, I can see the previous traffic beeing added to the contact but the source is also wrong (in that case Direct Traffic if I pass a pageUrl).
It's not indicated in the doc and it seems like a bug to me if I look at this:
We had the issue because we are enforcing a same-origin referer policy.
Can you investigate and let me know ?