: Google Analytics PHP API Getting fullReferrer I want to get fullReferrer using Google Analytics API with PHP. And I tried as follows: return $analytics->data_ga->get('ga:' . $profileId,
I want to get fullReferrer using Google Analytics API with PHP.
And I tried as follows:
return $analytics->data_ga->get('ga:' . $profileId,
'7daysAgo',
'today',
'ga:sessions',
array('dimensions' => 'ga:fullReferrer',));
And here is my javascript code for sending data.
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-86037456-1']);
_gaq.push(['_setReferrerOverride', 'facebook.com']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
And when I run php code I always get (direct) for fullReferrer.
More posts by @Murray432
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.