This project has moved and is read-only. For the latest updates, please go here.

Not seeing other events(SendEvent(), SendSocial(), SendException()) except SendView() in Google Analytics

Oct 29, 2013 at 8:38 AM
Hi Tim,

I am trying to use this sdk on windows phone 8, however, I can only the events of SendView() functions. I have tried SendException() and SendEvent() along with SendView(), but I could only see the events from SendView().

The codes are very simple
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using PhoneApp1.Resources;

namespace PhoneApp1
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            GoogleAnalytics.EasyTracker.GetTracker().SendView("main");

            InitializeComponent();

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            doSomething();
            
        }

        private void doSomething()
        {
            GoogleAnalytics.EasyTracker.GetTracker().SendEvent("test", "dosomething", null, 0);
            GoogleAnalytics.EasyTracker.GetTracker().SendView("dosomething");
            GoogleAnalytics.EasyTracker.GetTracker().SendException("exception", false);
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            GoogleAnalytics.EasyTracker.Current.Config = new GoogleAnalytics.EasyTrackerConfig()
            {
                TrackingId = "MY_ANALYTIC_ID",
            };
            GoogleAnalytics.EasyTracker.GetTracker().SendEvent("test", "userclick2", null, 0);
            GoogleAnalytics.EasyTracker.GetTracker().SendView("userclick2");
            GoogleAnalytics.EasyTracker.GetTracker().SendException("exception1", false);
        }
    }
}
<?xml version="1.0" encoding="utf-8" ?>
<!--More info at https://developers.google.com/analytics/devguides/collection/android/v2/parameters-->
<analytics xmlns="http://googleanalyticssdk.codeplex.com/ns/easytracker">
  <!--Replace placeholder ID with your tracking ID-->
  <trackingId>MY_ANALYTIC_ID</trackingId>
  <!--Replace placeholder name with your app name. If you leave this empty your WMAppManifest.xml Title will be used-->
  <!--<appName>Test</appName>-->
  <!--Replace placeholder version with your app version. If you leave this empty your WMAppManifest.xml version will be used-->
  <!--<appVersion>1.0.0.0</appVersion>-->
  <!--Enable writing of debug information to debug window log, useful for troubleshooting your implementation. Default is false.-->
  <!--<debug>false</debug>-->
  <!--The dispatch period in seconds. Default is 0 (indicating to send logs immediately)-->
  <dispatchPeriod>0</dispatchPeriod>
  <!--The dispatch period in seconds. Values must be between 0.0 and 100.0 Default is 100.0-->
  <!--<sampleFrequency>100.0</sampleFrequency>-->
  <!--Tells Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage. Note that this will slightly reduce the accuracy of geographic reporting. Default is false.-->
  <!--<anonymizeIp>false</anonymizeIp>-->
  <!--Enable automatic exception tracking. Default is false.-->
  <!--<reportUncaughtExceptions>false</reportUncaughtExceptions>-->
  <!--The amount of time (in seconds) your application can stay in the background before the session is ended. Negative value disables EasyTracker session management. Default is 30-->
  <!--<sessionTimeout>30</sessionTimeout>-->
  <!--Enable automatic app lifetime tracking (e.g. suspend/resume). Default is false.-->
  <!--<autoAppLifetimeTracking>false</autoAppLifetimeTracking>-->
  <!--Enable automatic app lifetime monitoring (e.g. suspend/resume). If true, all dispatched events will be sent on suspend and session timeout will be honored. true by default; must be true if autoAppLifetimeTracking is true.-->
  <!--<autoAppLifetimeMonitoring>true</autoAppLifetimeMonitoring>-->
  <!--Enables automatic network connectivity monitoring and avoids sending logs while not connected. Default is true.-->
  <!--<autoTrackNetworkConnectivity>true</autoTrackNetworkConnectivity>-->
  <!--Enable HTTPS instead of HTTP if true, causes all hits to be sent to the secure (SSL) Google Analytics endpoint. Default is false.-->
  <!--<useSecure>false</useSecure>-->
</analytics>
I could see events of SendView() in real time, however, I couldn't see any event of SendEvent() in event tab no matter it is hour-based or daily-based. Is there anything that I miss?
Oct 30, 2013 at 2:31 AM
Hi Him,

I am sorry about the last post, but it seems I was wrong. After a few hours, I could see all the events now!
Great work, thanks!