public HomeController( SiteContext currentSite, IEmailSenderResolver emailSenderResolver, ViewRenderer viewRenderer, GoogleAnalyticsHelper analyticsHelper ) { _currentSite = currentSite; _emailSenderResolver = emailSenderResolver; _viewRenderer = viewRenderer; _analyticsHelper = analyticsHelper; }
private IEnumerator UpdateVersion() { GoogleAnalyticsHelper.LogEvent("Install", version_, 0); progress_ = 0.05f; state_ = "Upgrading project"; yield return(null); Upgrade(localVersion_); progress_ = 0.10f; state_ = "Cleaning resources"; yield return(null); Noesis.BuildToolKernel.BuildBegin(); Noesis.BuildToolKernel.Clean(); progress_ = 0.20f; string[] activePlatforms = NoesisSettings.ActivePlatforms; foreach (var platform in activePlatforms) { state_ = "Regenerating " + platform + " resources"; yield return(null); using (var builder = new Noesis.BuildToolKernel(platform)) { builder.BuildAll(); } progress_ = 0.20f + 0.60f * (1 + ArrayUtility.IndexOf(activePlatforms, platform)) / activePlatforms.Length; } state_ = "Updating version"; yield return(null); NoesisVersion.SetCached(version_); progress_ = 0.85f; state_ = "Extracting documentation...\n"; yield return(null); ExtractDocumentation(); progress_ = 0.99f; state_ = "Opening Welcome Window...\n"; yield return(null); EditorWindow.GetWindow(typeof(NoesisWelcome), true, "Welcome to NoesisGUI!"); progress_ = 1.0f; Debug.Log("NoesisGUI v" + version_ + " successfully installed"); }
public GoogleAccountAnalytics( SiteContext currentSite, GoogleAnalyticsApiService analyticsApi, GoogleAnalyticsHelper analyticsHelper, IOptions <GoogleAnalyticsOptions> optionsAccessor, IHttpContextAccessor contextAccessor ) { _currentSite = currentSite; _analyticsApi = analyticsApi; _analyticsHelper = analyticsHelper; _options = optionsAccessor.Value; _contextAccessor = contextAccessor; }
public HomeController( IOidcHybridFlowHelper oidcHybridFlowHelper, IHttpClientFactory httpClientFactory, IdentityServer4.IdentityServerTools idserver, SiteContext currentSite, IEmailSenderResolver emailSenderResolver, ViewRenderer viewRenderer, GoogleAnalyticsHelper analyticsHelper ) { _oidcHybridFlowHelper = oidcHybridFlowHelper; _currentSite = currentSite; _emailSenderResolver = emailSenderResolver; _viewRenderer = viewRenderer; _analyticsHelper = analyticsHelper; _httpClientFactory = httpClientFactory; _idserver = idserver; }
private IEnumerator UpdateVersion() { GoogleAnalyticsHelper.LogEvent("Install", version_, 0); progress_ = 0.10f; state_ = "Upgrading project"; yield return(null); Upgrade(localVersion_); progress_ = 0.20f; state_ = "Updating version"; yield return(null); NoesisVersion.SetCached(version_); progress_ = 0.35f; state_ = "Creating default settings"; yield return(null); NoesisSettings.Get(); progress_ = 0.40f; state_ = "Extracting documentation...\n"; yield return(null); ExtractDocumentation(); progress_ = 0.60f; state_ = "Importing assets...\n"; yield return(null); NoesisPostprocessor.ImportAllAssets(); progress_ = 0.90f; state_ = "Opening Welcome Window...\n"; yield return(null); EditorWindow.GetWindow(typeof(NoesisWelcome), true, "Welcome to NoesisGUI!"); progress_ = 1.0f; Debug.Log("NoesisGUI v" + version_ + " successfully installed"); }
public void Awake() { GoogleAnalyticsHelper.instance = this; }
void OnGUI() { GUI.Label(new Rect(0, 0, Width, 60), "", _bannerStyle); GUILayout.BeginArea(new Rect(0, 0, Width, Height)); GUILayout.BeginVertical(); GUILayout.Space(4.0f); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(_banner); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.Space(18.0f); GUILayout.BeginVertical(); GUILayout.Space(8.0f); GUILayout.BeginHorizontal(); GUILayout.Space(12.0f); GUILayout.BeginVertical(); GUILayout.Label("Are you satisfied with NoesisGUI?", EditorStyles.label); GUILayout.Space(8.0f); GUILayout.Label("We would appreciate you taking the time to share your opinion.", EditorStyles.label); GUILayout.Label("Please consider writing a review in the Unity Asset Store.", EditorStyles.label); GUILayout.Label("User ratings are a valuable indicator for other possible customers.", EditorStyles.label); GUILayout.Space(8.0f); GUILayout.Label("A big hearty THANK YOU in advance :)", EditorStyles.label); GUILayout.Space(12.0f); GUILayout.BeginHorizontal(); Color currentBgColor = GUI.backgroundColor; GUI.backgroundColor = new Color(0.5f, 1.0f, 0.5f); Color currentFontColor = GUI.contentColor; GUI.contentColor = Color.green; int currentFontSize = GUI.skin.button.fontSize; GUI.skin.button.fontSize = 16; FontStyle currentFontStyle = GUI.skin.button.fontStyle; GUI.skin.button.fontStyle = FontStyle.Bold; if (GUILayout.Button("Review now!", new GUILayoutOption[] { GUILayout.MinHeight(40.0f), GUILayout.MinWidth(150.0f) })) { GoogleAnalyticsHelper.LogEvent("Review", "Reviewed", 0); UnityEngine.Application.OpenURL("http://u3d.as/55A"); EditorPrefs.SetInt(ReviewStatusKey, (int)State.Reviewed); Close(); } GUI.backgroundColor = currentBgColor; GUI.contentColor = currentFontColor; GUI.skin.button.fontSize = currentFontSize; GUI.skin.button.fontStyle = currentFontStyle; if (GUILayout.Button("Remind me in 7 days", GUILayout.MinHeight(40.0f))) { GoogleAnalyticsHelper.LogEvent("Review", "Later", 0); UpdateReviewDate(); Close(); } if (GUILayout.Button("Don't ask again", GUILayout.MinHeight(40.0f))) { GoogleAnalyticsHelper.LogEvent("Review", "Declined", 0); EditorPrefs.SetInt(ReviewStatusKey, (int)State.Reviewed); Close(); } GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.Space(12.0f); GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.EndVertical(); GUILayout.EndArea(); }
public void Track(string @event, IDictionary <string, object> properties) { GoogleAnalyticsHelper.LogPage(@event); }
public IAnalyticsTracker Initialise() { GoogleAnalyticsHelper.Initialize(m_AccountID, m_Domain); return(new GoogleAnalyticsTracker()); }
private static void CheckVersion() { EditorApplication.update -= CheckVersion; if (!UnityEditorInternal.InternalEditorUtility.inBatchMode) { string localVersion = NoesisVersion.GetCached(); string version = NoesisVersion.Get(); // Remove the file that indicates Noesis package is being installed AssetDatabase.DeleteAsset("Assets/NoesisGUI/Plugins/Editor/installing"); // Detect if /Library is being recreated string noesisFile = Path.Combine(Application.dataPath, "../Library/noesis"); bool libraryFolderRecreated = !File.Exists(noesisFile); if (libraryFolderRecreated) { File.Create(noesisFile).Dispose(); } if (localVersion != version && version != "0.0.0") { if (NoesisVersion.RestartNeeded()) { Debug.LogWarning("Please restart Unity to reload NoesisGUI native plugin! " + "If error persists remove 'Assets/NoesisGUI/Plugins' and reimport again."); return; } string title; if (localVersion != "") { title = "Upgrading NoesisGUI " + localVersion + " -> " + version; } else { title = "Installing NoesisGUI " + version; } EditorUtility.DisplayProgressBar(title, "", 0.0f); GoogleAnalyticsHelper.LogEvent("Install", version, 0); EditorUtility.DisplayProgressBar(title, "Upgrading project", 0.10f); Upgrade(localVersion); EditorUtility.DisplayProgressBar(title, "Updating version", 0.20f); NoesisVersion.SetCached(version); EditorUtility.DisplayProgressBar(title, "Creating default settings", 0.35f); NoesisSettings.Get(); EditorUtility.DisplayProgressBar(title, "Extracting documentation...", 0.40f); ExtractTar("NoesisGUI/Doc.tar", "/../NoesisDoc", "/../NoesisDoc"); EditorUtility.DisplayProgressBar(title, "Extracting blend samples...", 0.55f); ExtractTar("NoesisGUI/Samples/Samples-blend.tar", "/..", "/../Blend"); NoesisPostprocessor.ImportAllAssets((progress, asset) => { EditorUtility.DisplayProgressBar(title, asset, 0.60f + progress * 0.40f); }); EditorApplication.update += ShowWelcomeWindow; EditorUtility.ClearProgressBar(); Debug.Log("NoesisGUI v" + version + " successfully installed"); } else if (libraryFolderRecreated) { NoesisPostprocessor.ImportAllAssets(); } } }
public HomeController(GoogleAnalyticsHelper analyticsHelper) { _analyticsHelper = analyticsHelper; }
//this is used for billing controller public bool SetSubscription(string UserCode, int IdPlan, string AppToken) { //verificar existencia de la app token //obtiene ID de producto int idProduct = productsRepository.GetProductId(AppToken); if (idProduct == 0) { throw new Contract.Exceptions.ProductsNotFoundException("No se encontró un producto con el ProductToken " + AppToken, null); } //obtener usuario segun el app token y external code var user = usersRepository.GetUser(UserCode, idProduct); if (user == null) { throw new Contract.Exceptions.UserNotFoundException("No se encontró un usuario con el UserCode " + UserCode, null); } //verificar si existe una suscripcion actual. Si existe se cambia el IDPERFIL. var sub = subscriptionsRepository.GetUserCurrentSubscription(user.IdUser); if (sub == null) { //Si no existe, se crea la suscripcion. subscriptionsRepository.NewSubscription(new Repository.EntityFramework.Subscriptions { Active = true, DateCreated = DateTime.Now, ExternalCode = "", IdProfile = IdPlan, IdUser = user.IdUser, IsCurrent = true, RenewalDay = DateTime.Now.Day, LastRenewal = DateTime.Now }); } else { subscriptionsRepository.SetSubscriptionProfile(sub.IdSubscription, IdPlan); } (new Repository.Implementation.EventLogRepository()).SetLog("POR PINCHAR ANALYTICS", "GA"); try { //avisa a google analytics si es que tiene el codigo var producto = productsRepository.GetProduct(idProduct); if (producto != null) { (new Repository.Implementation.EventLogRepository()).SetLog("EXISTE PRODUCTO " + producto.IdProduct, "GA"); (new Repository.Implementation.EventLogRepository()).SetLog("CODIGO ANALYTICS " + producto.CodeAnalytics, "GA"); //si existe el codigo para el producto if (!String.IsNullOrEmpty(producto.CodeAnalytics)) { (new Repository.Implementation.EventLogRepository()).SetLog("TIENE CODIGO ANALYTICS " + producto.CodeAnalytics, "GA"); var profile = profilesRepository.GetProfile(IdPlan); if (profile != null) { (new Repository.Implementation.EventLogRepository()).SetLog("TIENE PROFILE " + IdPlan + " (" + profile.Name + ")", "GA"); GoogleAnalyticsHelper.TrackEvent(producto.CodeAnalytics, @"usuario", @"registro", @"perfil", @"1"); } } } } catch (Exception ex) { //nothing } return(true); }