ServerSideGA is an application component used for tracking Page View, Event, ... via Your website Google Analytic Account from Yii application (Server Side)
Features ¶
- Track Page View
- Track Event
- ...
Configuration ¶
- Extract the package to your Yii Extensions folder
- Add ssga to the components section in your Yii configuration
return array(
'components' => array(
'ssga' => array(
'class' => 'application.extensions.ssga.ServerSideGA',
'gaId' => 'UA-123456-78',
),
),
);
Usage ¶
// Track Page View
Yii::app()->ssga->trackPageView('/demo', 'Demo Page');
// Track Event
Yii::app()->ssga->trackEvent('Document', 'Download', 'demo-document.pdf');
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.