(function () { "use strict"; angular.module('streamApp').controller("firstMemoryOnboardingController", FirstMemoryController); FirstMemoryController.$inject = ['$scope', 'timelineService', 'userService', '$location', '$routeParams']; function FirstMemoryController($scope, timelineService, userService, $location, $routeParams) { $scope.timelineId = $routeParams.id; timelineService.get($scope.timelineId).then((timeline) => $scope.timeline = timeline); if ($routeParams.questionId) { timelineService.getAvailablePrompts($scope.timelineId) .then((prompts) => { $scope.prompt = prompts.find(p => p.promptId == $routeParams.questionId); }); } $scope.callback = function (content, dropId) { if (content && content.length > 40) { gtag_report_conversion(); } $location.url('congratulations?dropId=' + dropId + "&storylineId=" + $scope.timelineId); }; function gtag_report_conversion(url) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'AW-696539402/JgVzCOqWk80BEIqykcwC', 'event_callback': callback }); return false; } } })();