I am trying to request (using the gapi source code) the referred from link to the users website. so for example if they clicked through from facebook, and how many referrals came through.
My gapi code to link for page view by date currently looks like this.
$ga = new gapi(ga_email,ga_password);
$filter = 'country == United Kingdom && browser == Firefox || browser == Chrome';
$ga->requestReportData(ga_profile_id,array('browser','browserVersion'),array('pageviews','visits'),'-visits',$filter, $start_date=$date, $end_date=$date);
and is echoed in the page with
<?php echo $ga->getVisits() ?>
How do i get the filter to display the refered from in a list nd echo it through the page?
Here’s my script that sole purpose is to get referral URL and total pageviews and visits. I think that’s what you want.