Mobile app version of vmapp.org
Login or Join
Murray432

: 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,

@Murray432

Posted in: #GoogleAnalytics #Php

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.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray432

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme