コード例 #1
0
        public static async Task <TrackingResult> TrackPageViewAsync(this SimpleTracker tracker, string pageTitle, string pageUrl, Dictionary <string, string> beaconParameters = null)
        {
            var pageViewParameters = new PageView
            {
                DocumentTitle       = pageTitle,
                DocumentLocationUrl = pageUrl,
                CacheBuster         = tracker.AnalyticsSession.GenerateCacheBuster()
            };

            return(await tracker.TrackPageViewAsync(pageViewParameters));
        }
コード例 #2
0
        public static async Task <TrackingResult> TrackPageViewAsync(this SimpleTracker tracker, string pageTitle, string pageUrl, IDictionary <int, string> customDimensions)
        {
            var pageViewParameters = new PageView
            {
                DocumentTitle       = pageTitle,
                DocumentLocationUrl = pageUrl,
            };

            pageViewParameters.SetCustomDimensions(customDimensions);

            return(await tracker.TrackAsync(pageViewParameters));
        }
コード例 #3
0
        public static async Task <TrackingResult> TrackEventAsync(this SimpleTracker tracker, string category, string action, string label, long value = 1)
        {
            var eventTrackingParameters = new EventTracking
            {
                Category    = category,
                Action      = action,
                Label       = label,
                Value       = value,
                CacheBuster = tracker.AnalyticsSession.GenerateCacheBuster()
            };

            return(await tracker.TrackAsync(eventTrackingParameters));
        }
コード例 #4
0
        public static async Task <TrackingResult> TrackScreenviewAsync(this SimpleTracker tracker, string appName,
                                                                       string appId, string appVersion, string appInstallerId)
        {
            var screenviewParamenters = new ScreenviewTracking
            {
                ApplicationName        = appName,
                ApplicationId          = appId,
                ApplicationVersion     = appVersion,
                ApplicationInstallerId = appInstallerId
            };

            return(await tracker.TrackAsync(screenviewParamenters));
        }
コード例 #5
0
 static public void Configure(string trackingAccount,
                              string trackingDomain,
                              string Hostname,
                              string OsPlatform,
                              string OsVersion,
                              string OsVersionString)
 {
     instance = new SimpleTracker(trackingAccount,
                                  trackingDomain,
                                  Hostname,
                                  OsPlatform,
                                  OsVersion,
                                  OsVersionString);
 }
コード例 #6
0
        public static async Task <TrackingResult> TrackPageViewAsync(this SimpleTracker tracker, string pageTitle, string pageUrl, IDictionary <int, string> customDimensions)
        {
            var pageViewParameters = new PageView
            {
                DocumentTitle       = pageTitle,
                DocumentLocationUrl = pageUrl,
                DocumentHostName    = tracker.Hostname,
                CacheBuster         = tracker.AnalyticsSession.GenerateCacheBuster()
            };

            pageViewParameters.SetCustomDimensions(customDimensions);

            return(await tracker.TrackAsync(pageViewParameters));
        }
コード例 #7
0
        public static async Task <TrackingResult> TrackEventAsync(this SimpleTracker tracker, string category, string action, string label, IDictionary <int, string> customDimensions, long value = 1)
        {
            var eventTrackingParameters = new EventTracking
            {
                Category = category,
                Action   = action,
                Label    = label,
                Value    = value,
            };

            eventTrackingParameters.SetCustomDimensions(customDimensions);

            return(await tracker.TrackAsync(eventTrackingParameters));
        }
コード例 #8
0
        public static async Task <TrackingResult> TrackScreenviewAsync(this SimpleTracker tracker, string appName,
                                                                       string appId, string appVersion, string appInstallerId, string screenName)
        {
            var screenviewParamenters = new ScreenviewTracking
            {
                ApplicationName        = appName,
                ApplicationId          = appId,
                ApplicationVersion     = appVersion,
                ApplicationInstallerId = appInstallerId,
                ScreenName             = screenName,
                CacheBuster            = tracker.AnalyticsSession.GenerateCacheBuster()
            };

            return(await tracker.TrackAsync(screenviewParamenters));
        }
コード例 #9
0
        public static async Task <TrackingResult> TrackScreenviewAsync(this SimpleTracker tracker, string appName,
                                                                       string appId, string appVersion, string appInstallerId, string screenName, IDictionary <int, string> customDimensions)
        {
            var screenviewParamenters = new ScreenviewTracking
            {
                ApplicationName        = appName,
                ApplicationId          = appId,
                ApplicationVersion     = appVersion,
                ApplicationInstallerId = appInstallerId,
                ScreenName             = screenName,
            };

            screenviewParamenters.SetCustomDimensions(customDimensions);

            return(await tracker.TrackAsync(screenviewParamenters));
        }
コード例 #10
0
        public static async Task <TrackingResult> TrackEventAsync(this SimpleTracker tracker, string category, string action, string label, IDictionary <int, string> customDimensions, long value = 1)
        {
            var eventTrackingParameters = new EventTracking
            {
                Category         = category,
                Action           = action,
                Label            = label,
                Value            = value,
                DocumentHostName = tracker.Hostname,
                CacheBuster      = tracker.AnalyticsSession.GenerateCacheBuster()
            };

            eventTrackingParameters.SetCustomDimensions(customDimensions);

            return(await tracker.TrackAsync(eventTrackingParameters));
        }
コード例 #11
0
        public static async Task <TrackingResult> TrackScreenviewAsync(this SimpleTracker tracker, string appName,
                                                                       string appId, string appVersion, string appInstallerId, string screenName, IDictionary <int, string> customDimensions)
        {
            var screenviewParamenters = new ScreenviewTracking
            {
                ApplicationName        = appName,
                ApplicationId          = appId,
                ApplicationVersion     = appVersion,
                ApplicationInstallerId = appInstallerId,
                DocumentHostName       = tracker.Hostname,
                ScreenName             = screenName,
                CacheBuster            = tracker.AnalyticsSession.GenerateCacheBuster()
            };

            screenviewParamenters.SetCustomDimensions(customDimensions);

            return(await tracker.TrackAsync(screenviewParamenters));
        }
コード例 #12
0
 public static async Task <TrackingResult> TrackPageViewAsync(this SimpleTracker tracker, string pageTitle)
 {
     return(await TrackPageViewAsync(tracker, pageTitle, null));
 }