Tracking API, is there any way that I can get visitor channel type (referrer) in browser level?

Hi all!

I would like to get the visitor channel type like organic, direct or campaign from the browser level. I tried using getAttributionInfo but it returns a set of URL instead of a simple keyword.

Would love to get a response like direct, social or campaign.

Also I tried getAttributionCampaignName but it is not working.

Any help would be greatly appreciated!