Open srakl opened 9 years ago
This plugin isn't meant for onclicks. Yii::app()->googleAnalytics->_setCustomVar(1, 'Section', 'Life & Style', 3);
would set it in the global code and not return GA code.
you mean like this? in my controller? This doesn't work for me
public function actionAjaxGetnumber($id) {
if (Yii::app ()->request->isAjaxRequest) {
Yii::app()->googleAnalytics->_trackEvent($_GET['type'], "Number", $id);
}
sorry need help, kind of new to yii
in my view, i added this
but it echo's
1
what am i doing wrong? Thanks