Skip to content

Commit c0e53ba

Browse files
author
Samson
committed
a
1 parent 1a11fbb commit c0e53ba

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
<meta name="fragment" content="!">
77
<base href="/repos/apiengine-client/" />
88
<link rel="stylesheet" href="css/styles.css">
9-
10-
</head>
11-
<body>
12-
<script data-main="js/main" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.1/require.min.js" type="text/javascript"></script>
13-
149
<script>
1510
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
1611
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -20,6 +15,11 @@
2015
ga('create', 'UA-39509998-1', 'apiengine.io');
2116
ga('send', 'pageview');
2217
</script>
18+
</head>
19+
<body>
20+
<script data-main="js/main" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.1/require.min.js" type="text/javascript"></script>
21+
22+
2323

2424
</body>
2525
</html>

js/views/app.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ define([
2222
// log all 500 error codes with the server. We may also log others - this is done in libs/form/form.js
2323
// when no UI elements are found for handling a valid server error condition.
2424
EventBus.on('all', function (event) {
25-
_gaq.push(['_trackEvent', 'app', event])
26-
_gaq.push(['_trackEvent', 'Videos', 'Stop', 'Gone With the Wind']);
25+
console.log('gaaa');
26+
ga('send', {
27+
hitType: 'event',
28+
eventCategory: 'app',
29+
eventAction: event
30+
})
2731
});
2832
EventBus.trigger(Events.NEW_USER);
2933
$("body").ajaxError(function(ev, res, req) {

js/views/home/pricing.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ define([
44
'backbone',
55
'models/session',
66
'text!templates/home/pricing.html',
7-
], function($, _, Backbone, Session, pricingTemplate){
7+
'libs/events/event_bus',
8+
'libs/events/events'
9+
], function($, _, Backbone, Session, pricingTemplate, EventBus, Events){
810
var ExamplePage = Backbone.View.extend({
911
el: '.page',
1012
initialize: function () {
@@ -17,6 +19,8 @@ define([
1719
$('.top-bar-menu li a.active').removeClass('active');
1820
$('.top-bar-menu li a.pricing-button').addClass('active');
1921
this.$el.html(pricingTemplate);
22+
EventBus.trigger(Events.NEW_USER);
23+
2024
}
2125
});
2226
return ExamplePage;

0 commit comments

Comments
 (0)