Commit 9ad22ae22be2552bbf5a1f9c1be2f3a6368dd9a2
1 parent
61b69ada07
Exists in
master
and in
1 other branch
work on google analytics
Showing
1 changed file
with
6 additions
and
10 deletions
Show diff stats
script.js
... | ... | @@ -181,10 +181,7 @@ |
181 | 181 | }); |
182 | 182 | |
183 | 183 | /*****THIS IS FOR STEP ONE FORM ******/ |
184 | - $scope.next = function() { | |
185 | - | |
186 | - Analytics.trackEvent('information', 'play', 'django.mp4'); | |
187 | - | |
184 | + $scope.next = function() { | |
188 | 185 | $scope.data.status = null |
189 | 186 | if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined || $scope.data.city == undefined) { |
190 | 187 | var x = document.getElementById("snackbar") |
... | ... | @@ -204,6 +201,7 @@ |
204 | 201 | data: $scope.data, |
205 | 202 | headers: {} |
206 | 203 | }).then(function mySuccess(result) { |
204 | + Analytics.trackEvent('information', 'click', 'django.mp4'); | |
207 | 205 | console.log("result", result) |
208 | 206 | $scope.detail = result; |
209 | 207 | data.applicantId = result.data.id; |
... | ... | @@ -216,9 +214,6 @@ |
216 | 214 | } |
217 | 215 | |
218 | 216 | $scope.calculateAmount = function(){ |
219 | - | |
220 | - Analytics.trackEvent('applicants', 'play', 'django.mp4'); | |
221 | - | |
222 | 217 | if ($scope.data.stage == undefined || $scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined || $scope.data.city == undefined) { |
223 | 218 | var x = document.getElementById("snackbar") |
224 | 219 | x.className = "show"; |
... | ... | @@ -237,6 +232,7 @@ |
237 | 232 | data: $scope.data, |
238 | 233 | headers: {} |
239 | 234 | }).then(function mySuccess(result) { |
235 | + Analytics.trackEvent('applicants', 'click', 'django.mp4'); | |
240 | 236 | console.log("result", result) |
241 | 237 | $scope.detail = result; |
242 | 238 | data.applicantId = result.data.id; |
... | ... | @@ -272,9 +268,6 @@ |
272 | 268 | |
273 | 269 | /*****THIS IS FOR STEP THREE FORM ******/ |
274 | 270 | $scope.create = function() { |
275 | - | |
276 | - Analytics.trackEvent('payments', 'play', 'django.mp4'); | |
277 | - | |
278 | 271 | // if ($scope.data.name == undefined || $scope.data.email == undefined || $scope.data.number == undefined) { |
279 | 272 | // var x = document.getElementById("snackbar") |
280 | 273 | // x.className = "show"; |
... | ... | @@ -307,6 +300,7 @@ |
307 | 300 | data: data, |
308 | 301 | headers: {} |
309 | 302 | }).then(function mySuccess(paymentResult) { |
303 | + Analytics.trackEvent('payments', 'click', 'django.mp4'); | |
310 | 304 | console.log("paymentResult",paymentResult) |
311 | 305 | $scope.paymentResult = paymentResult; |
312 | 306 | }, function myError(error) {}); |
... | ... | @@ -338,6 +332,7 @@ |
338 | 332 | $scope.paymentResponse = {}; |
339 | 333 | |
340 | 334 | function createPayment(response) { |
335 | + Analytics.trackEvent('payments', 'click', 'django.mp4'); | |
341 | 336 | console.log("response====from===razorpay",response) |
342 | 337 | $route.reload(); |
343 | 338 | $scope.paymentResponse.razorPaymentId = response.razorpay_payment_id; |
... | ... | @@ -351,6 +346,7 @@ |
351 | 346 | data: $scope.paymentResponse, |
352 | 347 | headers: {} |
353 | 348 | }).then(function mySuccess(searchResult) { |
349 | + Analytics.trackEvent('payments', 'click', 'django.mp4'); | |
354 | 350 | console.log("searchResult", searchResult) |
355 | 351 | $location.path("/confirmation") |
356 | 352 | //$scope.showToastr() | ... | ... |