Form Api always sets the source as DIRECT_TRAFFIC

hello,
i am using the Form API to create a contact when a user registers on my Wordpress site.
i’ve installed the wordpress plugin and checked that the tracking code is present on my website. ive also made sure a Cookie is present.
here is the payload i send to the form API:

{"firstname":"firstname","lastname":"lastname","email":"test@email.com","hs_context":"{\"hutk\":\"46dd4b39c44d6331766e5a30e0fc7cbd\",\"ipAddress\":\"127.0.0.1\",\"pageUrl\":\"http:\\\/\\\/mywebsite.com\\\/login\",\"pageName\":\"etape inscription\"}"}

is there anything i can do to improve tracking?

Hi, @aVIDAL3 :waving_hand: Thanks for your question. I don’t see any red flags with your payload formatting. One question, have you tried implementing a window.onload event?

window.onload = function() {
 // Your form submission logic here
};

It’s challenging to know what’s causing this issue without more information or a way to test the form in-action.

Best,

Jaycee