Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angulartics #148

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"angular": "~1.3.*",
"angular-route": "~1.3.*",
"angular-cookies": "~1.3.*",
"angulartics": "0.17.*",
"createjs-soundjs": "0.6.*",
"angular-bootstrap-colorpicker": "~3.0.*"
},
Expand Down
4 changes: 3 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ var fs = require('fs'),
'./bower_components/tom32i-option-resolver.js/dist/option-resolver.min.js',
'./bower_components/tom32i-gamepad.js/dist/gamepad.min.js',
'./bower_components/tom32i-key-mapper.js/dist/key-mapper.min.js',
'./bower_components/tom32i-asset-loader.js/dist/asset-loader.min.js'
'./bower_components/tom32i-asset-loader.js/dist/asset-loader.min.js',
'./bower_components/angulartics/dist/angulartics.min.js',
'./bower_components/angulartics/dist/angulartics-ga.min.js'
],
recipes = {
server: require('./recipes/server.json'),
Expand Down
2 changes: 1 addition & 1 deletion src/client/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var curvytronApp = angular.module('curvytronApp', ['ngRoute', 'ngCookies', 'colorpicker.module']),
var curvytronApp = angular.module('curvytronApp', ['ngRoute', 'ngCookies', 'colorpicker.module','angulartics', 'angulartics.google.analytics']),
gamepadListener = new GamepadListener({analog: false, deadZone: 0.4});

gamepadListener.start();
Expand Down
8 changes: 4 additions & 4 deletions src/client/service/Analyser.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ Analyser.prototype.getTitle = function(controller, params)
*/
Analyser.prototype.sendPageView = function(page, title)
{
ga('send', 'pageview', {
page: page,
title: title
});
// ga('send', 'pageview', {
// page: page,
// title: title
// });
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tom32i i don't kown the best way to desactivate, just remove service declaration in app.js ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Angulartics send the page title to GA, what is the bay to manage page title ?

};
2 changes: 1 addition & 1 deletion src/client/views/rooms/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h2 class="header" ng-class="{ 'empty': rooms.isEmpty() }">
/>
</span>
<form ng-submit="createRoom()" class="top-right-form">
<button type="submit" id="submit">
<button type="submit" id="submit" analytics-on="click" analytics-event="Create Room">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking "clicks" doesn't really make sens here: since you can create the room by pressing Enter in the text field. We need domain action oriented events.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need both, interface interactions and domain events. For example perhaps nobody use sur submit button and use enter key finally, if it's the case we can remove this button. But we need analytics to know

<span><i class="icon-plus"></i></span>
</button>
<input type="text" ng-model="roomName" class="form-control clearfix" name="name" placeholder="Create a new room..." maxlength="{{ roomMaxLength }}" />
Expand Down