Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Google Analytics Plugin

Provides close integration for FarCry projects with the Google Analytics service.

Features include:

  • webtop overview integration; showing stats for individual pages directly in the webtop
  • support for downloads and external link reporting
  • a framework for tracking Google custom variables
  • popular content publishing rule

Google Analytics uses the old style of GA tracking that goes at the bottom of the page. Version 2 will be upgraded to use the new GA API settings in due course. For now this still works just fine, but its worth mentioning in case you were thinking of trying the new GA code.

Installation

Checkout from source control

svn checkout https://farcry.jira.com/svn/GA/trunk
to
./farcry/plugins/googleAnalytics

TRUNK should be mostly stable. But there are specific milestone tags for those who don't want to risk it.

Update project constructor

Add googleAnalytics to the plugin list within ./www/farcryConstructor.cfm

./www/farcryConstructor.cfm
<!---// set plugin list--->
<cfset THIS.plugins = "farcrycms,googleMaps,googleAnalytics,farcrydoc" />

Deploy content types

Go into the webtop ADMIN > DEVELOPER TOOLS and deploy all the plugin content types.

Update Google Analytics configuration file

You will need to update the plugins configuration to include your projects specific Google Analytics URCHIN code.

Add GA custom tag to views

You will need to add the GA custom tag to all the relevant views you want to track. The best suggestion is to put the code into some sort of "footer" template that gets included on every page that visitors see.

<!--- import tag library --->
<cfimport taglib="/farcry/plugins/googleAnalytics/tags" prefix="ga" />

<!--- add track tag; ideally just above the closing </body> --->
<ga:track stObject="#request.stObj#" />

Note we pass in the entire object from the request scope; helps us deal elegantly with both individual objects and type webskins.

  • No labels