Google Analytics
| Name | GoogleAnalytics |
|---|---|
| Files |
|
| Related plugins |
This plugin originated from a question in the forum on how to implement the Google Analytics Flash API with MegaZine3, and is basically just a very rudimentary demonstration thereof. For now, it only tracks clicks on links in the book.
Contents |
Plugin Interactions
This plugin works by overriding the default protocol handlers in the links plugin for common links, such as http:// and mailto:.
Settings
gaaccount
- Type: String
- Default:
UA-000-000
The Google Analytics account for which to track the results.
gatrackas
- Type: String
Tracks all links going out from the engine as the same, that being the value of this setting. In detail, this calls trackPageview() with the given value. Otherwise calls the same function, but with the value of the link clicked.
gatrackevent
- Type: String
A comma separated list of strings that should be passed to the trackEvent() function, with two available "variables", {url}, the URL that is being navigated to, and {target}, the target parameter of the link. The fourth parameter, if given, will be converted to a number (as that's what the function of the Analytics API takes).
Example
<book plugins="googleanalytics" gaaccount="UA-123-456" gatrackevent="buttonClicked,Outgoing,{url}"> <!-- ... --> </book>
External links
| MegaZine3 Plugin-related articles | |
|---|---|
| Plugins | Anchors · Background Sounds · Batchpages · Bookmarks · Console · ElementIDs · Gallery · Google Analytics · Help · JavaScript · Keyboard Navigation · Links · NavigationBar · Options · Overlays · Password · PDFLinks · Print · PrintPDF · SWFAddress· Search · Sidebar · Slideshow · Titles |
| Plugin Articles | Writing a plugin · Writing a plugin II · Plugin development |