如何保存到数据库流量渠道细分(所有标准的谷歌分析组)?

I have a simple app in which I want to save Traffic channels breakdown (all the standard google analytics groups). am saving data to database using ajax like this

$.ajax({
    type: 'POST',
    data: {
        direct: direct,
        referral: referral;
        organicsearch:  organicsearch,
        paidsearch:  paidsearch,
        socialnetwork: socialnetwork,
        display: display,
        otheradvertising: otheradvertising
    },
    url: '/php/session.php',
    success: function (results) {},
    error: function () {}
});

How do I get these Traffic channels so that I can save them to database?