pagelessOnboardingApp.service("pagelessOnboardingService", [ "$http", "Constants", function($http, Constants) { var baseUrl = Constants.apiUrl; var mktgUrl = Constants.marketingUrl; this.userRegistration = function(userEmail, timeZone, companyId, targetURL, obStep,visitorId,watchlistId,isConversionBanner,isCanadian, registeredUserIP) { var pageType = "index"; if (window.currentPage != undefined && window.currentPage != "index") { pageType = getSignUpPageType(); } var config = { params : { "email" : userEmail, "timeZone" : timeZone, "companyId" : companyId, "targetURL" : targetURL, "obStep" : obStep, "visitorId":visitorId, "pageType" : pageType, "watchlistId":watchlistId, "isCanadian":isCanadian, "registeredIpAddress":registeredUserIP } }; if(isConversionBanner) { config.params.Type = "Conversion Banner"; } var promise = $http.get(baseUrl + "/addSimpleVisitor.htm",config); return promise; } this.setEmployerOrInterestedCompany = function(company, userEmail, isEmployer) { var config = { params : { "companyId" : company.id, "userEmail" : userEmail, "isEmployer" : isEmployer, } }; var promise = $http.get(baseUrl + "/onboarding/setEmployerOrInterestedCompany.htm",config); return promise; } this.getUserCountry = function(){ var promise = $http.get(mktgUrl + "/geoip/api/v1/country"); return promise; } } ]);