davefu / google-analytics
Component for Google Analytics code
v2.0
2014-09-20 15:45 UTC
Requires
- nette/nette: 2.1.*
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-08-25 10:58:55 UTC
README
This is Google Analytics component for Nette Framework.
Instalation
Include extension in config.neon and add Google Analytics key (if key is not defined, GA script will not be printed):
analytics:
key: "UA-XXXXXXXX-X"
extensions:
analytics: davefu\GoogleAnalytics\DI\AnalyticsExtension
Usage
You have to insert component factory to BasePresenter and use the component in @layout.latte:
/** @var \davefu\GoogleAnalytics\Components\GoogleAnalyticsFactory\GoogleAnalyticsFactory @inject */ protected $googleAnalyticsFactory; public function createComponentAnalytics() { return $this->googleAnalyticsFactory->create(); }