Implementing Google Analytics on a Drupal site

10
Scaling Drupal Implementing Google Analytics

description

 

Transcript of Implementing Google Analytics on a Drupal site

Page 1: Implementing Google Analytics on a Drupal site

Scaling Drupal

Implementing Google Analytics

Page 2: Implementing Google Analytics on a Drupal site

Starting Point

• Drupal 5.2• Google Analytics• AWStats

Page 3: Implementing Google Analytics on a Drupal site

Drupal Google Analytics Module

• Not updated in a timely fashion when GA js is updated

• Not recommended!

Page 4: Implementing Google Analytics on a Drupal site

Recommended Implementation

• Load GA js on all pages via template file• Invoke GA js as low as possible on each page• Reporting results tweak

– Move GA js to web server– Load GA js from web server– Invoke GA js as high as possible on each

page

Page 5: Implementing Google Analytics on a Drupal site

Implementation Validation

• AWStats– Configure to generate accurate page view

counts e.g. exclude xmlrpc.php, *.js, *.css, etc

– May be higher than GA number, because of:• Visitors that bounce from the site before

the GA script runs• Visitors that disable js and cookies• Misc

Page 6: Implementing Google Analytics on a Drupal site

Setting up a GA account

• Register at http://www.google.com/analytics/• Add GA js to pages• GA can take up to 24 hours for data to

populate at first *and* thereafter

Page 7: Implementing Google Analytics on a Drupal site

Extending your analytics

• GA User Defined Segments– Anonymous vs. registered vs. other

• GA Benchmarking• Google Webmaster Tools• CrazyEgg, Quantcast, Alexa, Etc• Voxant - video• Clearspring - widgets

Page 8: Implementing Google Analytics on a Drupal site

Analytics Highpoints

• Pages per visit 5+ good, 10+ great• Time on site 5 minutes+ good, 10 minutes+

great• Bounce rate < 30% fantastic, 30% - 50% good,

50% - 70% room for improvement, 70%+ something is wrong– Bounce rate under 5% means you have a

fantastic site or something is wrong, under 1% something is definitely wrong

Page 9: Implementing Google Analytics on a Drupal site

Summary

• Always validate Google Analytics numbers• There is no such thing as a free lunch• Google Analytics is great at some point(s) in a

company’s lifecycle, but eventually you’ll need to move to commercial tools

• Test in multiple browsers to make sure the GA placement is optimal

• When adding javascript to pages retest GA functionality

Page 10: Implementing Google Analytics on a Drupal site

Contact

Arman Anwar, Director of Systems Development

[email protected]

Marc Benton, Director of Product Development

[email protected]

Andy Forbes, [email protected]