GetAttributionInfo() returns 0 when it is organic or direct traffic

Hi there,

I’ve been using Matomo Javascript API to find out my visitor details whether they are coming in with organic, direct, referral or paid.

So far, paid works well and everything. However when it is organic and direct, the response I get from matomo is just empty.

I would like to know are there any ways that I can trigger the matomo API to send me the source of the visitor like how it should be in the visits logs?