https://github.com/dwolfhub/angular-ga-tracking
Angular Directives for Google Analytics Tracking
https://github.com/dwolfhub/angular-ga-tracking
Last synced: 16 days ago
JSON representation
Angular Directives for Google Analytics Tracking
- Host: GitHub
- URL: https://github.com/dwolfhub/angular-ga-tracking
- Owner: dwolfhub
- License: mit
- Created: 2014-03-15T15:46:19.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-15T16:22:11.000Z (almost 12 years ago)
- Last Synced: 2025-01-19T06:44:07.946Z (12 months ago)
- Size: 120 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
angular-ga-tracking
===================
Angular Directives for Google Analytics Tracking
## Usage
### Including the module
```javascript
var app = angular.module("app", ["ga.tracker"]);
```
### Use the directives
#### Tracking Page Views
When the directive is used, it registers a page view at the current $location.path();. I like to add it once in each of my templates.
```html
```
#### Tracking Events (clicks)
When you add the diretive to an HTML element and that element is clicked, the event will be registered with GA.
```html
Submit Event!
```