Преглед изворни кода

Track user log in and sign up.

Paulo Reis пре 10 година
родитељ
комит
5c121a5f05
1 измењених фајлова са 12 додато и 0 уклоњено
  1. 12 0
      services/web/app/views/layout.jade

+ 12 - 0
services/web/app/views/layout.jade

@@ -74,6 +74,18 @@ html(itemscope, itemtype='http://schema.org/Product')
 						handle: '#{session.user._id}',
 						email: '#{session.user.email}',
 					}]);
+
+			if (justRegistered)
+				script(type="text/javascript").
+					Countly.q.push(['add_event',{
+						key: 'user-registered'
+					});
+
+			if (justLoggedIn)
+				script(type="text/javascript").
+					Countly.q.push(['add_event',{
+						key: 'user-logged-in'
+					});
 		// End countly Analytics
 				
 		script(type="text/javascript").