BACKTRACE

(condense)

Back to Posts List

GET

Google Analytics: Tracking AJAX and Flash

Google Analytics has a new feature that Ajax & Flash developers will find extremely useful . According to the new article, is now possible to track page views in Ajax & Flash applications. And, it is simple.

<br />http_request.onreadystatechange = sendAlert;<br />http_request.open(’GET’, url, true);<br />http_request.send(null);<br />}<br /><br />function sendAlert() {<br /> if (http_request.readyState == 4) {<br /> if (http_request.status == 200) {<br /> alert(http_request.responseText);<br /> pageTracker._trackPageview("/pagefilename1" ); }<br /> else {<br /> alert(’Error.’);<br /> }<br />}<br />}<br />
An important usage tip about this feature is that, Google Analytics codes are normally installed just before the /body tag. When calling _trackPageview function, you’ll need to use it after the Analytics codes are included. Which means installing the Analytics codes just after the tag is a guaranteed solution.

POST

blog comments powered by Disqus

I Don't have cookies.

ELAD ENV

Variable Value
LINKEDIN
TWITTER
FACEBOOK
GITHUB
WWR
IRC
{ 'irc.freenode.net' => [ '#rubyonrails', '#railsbridge', '#ruby', '#mootools' ]}
SKYPE
eladmeidar

You're seeing this error because I think it is funny.