Example #1
0
        /// <summary>
        /// Tracks the page view and streams a GIF image.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="pageView">The page view.</param>
        public static void TrackPageViewWithImage(HttpContext context, GooglePageView pageView)
        {
            //build request
            TrackingRequest request = new RequestFactory().BuildRequest(pageView);

            FireTrackingEvent(request);
            //context.Response.Write(request.TrackingGifURL);
            ShowTrackingImage(context);
        }
Example #2
0
        /// <summary>
        /// Tracks the page view and streams a GIF image.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="pageView">The page view.</param>
        public static void TrackPageViewWithImage(HttpContext context, GooglePageView pageView)
        {
            //build request
            TrackingRequest request = new RequestFactory().BuildRequest(pageView, context);

            FireTrackingEvent(request);

            ShowTrackingImage(context);
        }
Example #3
0
        protected void btnPageSubmit_Click(object sender, EventArgs e)
        {
            GooglePageView pageView = new GooglePageView(txtPageTitle.Text,
                                                         txtPageDomainName.Text,
                                                         txtPageURL.Text);
            TrackingRequest request = new RequestFactory().BuildRequest(pageView);

            GoogleTracking.FireTrackingEvent(request);

            divAction.InnerText = "Page view successfully tracked";
            divAction.Visible   = true;
        }
 public static void TrackPlay()
 {
     try
     {
         GooglePageView pageView = new GooglePageView("youtube.fm",
                                                      "youtube.fm",
                                                      "/play.html");
         TrackingRequest request = new RequestFactory().BuildRequest(pageView);
         request.AnalyticsAccountCode = "UA-29014752-2";
         GoogleTracking.FireTrackingEvent(request);
     }
     catch (Exception exception)
     {
         Log.Error(exception);
     }
 }