/ Published in: PHP
Below are two functions I've been using to make event tracking a little easier in CodeIgniter.
Two functions are available, google_analytics() & track_event().
google_analytics() takes one argument and uses it as the UA code for your tracking profile. track_event has two required parameters, $category and $event. The other two items are optional and won't be inserted unless specified.
Usage is pretty straight-forward:
Two functions are available, google_analytics() & track_event().
google_analytics() takes one argument and uses it as the UA code for your tracking profile. track_event has two required parameters, $category and $event. The other two items are optional and won't be inserted unless specified.
Usage is pretty straight-forward: