Tampilkan postingan dengan label WP7. Tampilkan semua postingan
Tampilkan postingan dengan label WP7. Tampilkan semua postingan

Kamis, 16 Agustus 2018

Google and no wireless Analytics for Windows Phone

WP7 - The data connection is where there seems to be a lot of confusion when it comes to dual-SIM phones. Whereas both SIM slots on some dual-SIM phones are capable of supporting 3G or 4G connections, you can use 4G on only one SIM at a time. and easy to navigate, well we have collected a lot of data from the field directly and from many other blogs so very complete his discussion here about WP7, on this blog we also have to provide the latest automotive information from all the brands associated with the automobile. ok please continue reading:

Update (9/2/12): I have created a nuget package which makes instrumenting an app even easier. Check it out here.

Last week I gave a talk on Google Analytics for Windows Phone at the Orlando Windows User Group meeting at the brand new Microsoft Store. The store was full of people and the meeting was well attended. Micheal Stark (@starknetwork) talked about The Adventures of Migrating a Windows Phone 7 App to Windows 8.
Missed my talk? Don't worry you can watch the video below.





The code and power point slides are available for download.

References



COMPUTERS NEWS
https://nandncomputers.blogspot.com/
Motorola ROKR E8 Unlocked ATT TMobile MP3 Cam-Video Cell Phone - $119
https://nandncomputers.blogspot.com/2009/09/motorola-rokr-e8-unlocked-att-tmobile.html
Professional Social Network-A Must for Today's Professionals
https://nandncomputers.blogspot.com/2011/08/professional-social-network-must-for.html
Useful Microsoft Excel keyboard shortcut..!!!
https://nandncomputers.blogspot.com/2012/06/useful-microsoft-excel-keyboard-shortcut.html
How to Automatically Shrink url of ADF.ly || Earn Money By ADF.ly
https://nandncomputers.blogspot.com/2013/12/how-to-automatically-shrink-url-of.html

Rabu, 15 Agustus 2018

Analytics and no wireless for Windows Phone nuget to rule them all

WP7 - The data connection is where there seems to be a lot of confusion when it comes to dual-SIM phones. Whereas both SIM slots on some dual-SIM phones are capable of supporting 3G or 4G connections, you can use 4G on only one SIM at a time. and easy to navigate, well we have collected a lot of data from the field directly and from many other blogs so very complete his discussion here about WP7, on this blog we also have to provide the latest automotive information from all the brands associated with the automobile. ok please continue reading:

In the previous post I showed how to instrument a Windows Phone app with Google Analytics using GoogleAnalyticsTracker.WindowsPhone. There are couple issues with this approach. It requires writing a substantial amount of code for event and custom variables tracking. Google Analytics for Windows Phone solves the issue of custom variables, but its performance is inferior to GoogleAnalyticsTracker.WindowsPhone. Furhtermore, both nugets suffer from a major shortcoming of supporting only single provider, Google Analytics (GA). If for any reason you decide to switch to another provider, it would require changing every file in the app which has a GA fingerprint. Having used three different analytics providers (PreEmptive, Flurry, and GA) in the past two years, I have experienced the pain first hand. Something had to be done to relieve the pain and stop the suffering.

Analytics for Windows Phone
Introducing Analytics for Windows Phone nuget to rule them all. It abstracts out analytics providers and makes it trivial to swap in and out different providers. Even though it currently only supports GA, it takes the best features of both existing nugets and provides them in a single and simple to use nuget package. Its performance is on par with GoogleAnalyticsTracker.WindowsPhone and simplicity of use goes beyond Google Analytics for Windows Phone. The custom variables are sent with every call to Track method. You do not need to explicitly define or call them. What variables are sent you may ask? Here they are:
































IndexVariable keyVariable value example
1Device ID{48a98908-8449-e011-854c-00237de2db9e}
2Application version3.5
3Device OSWP 7.10.8773
4DeviceNokia - Lumia 900
5TotalMemory256 MB

Instrumenting an App
After installing the package build your app solution. Open App.cs file and add a static property Tracker as shown below. We will use this property throughout the app to call tracking events.
public partial class App : Application
{
private static AnalyticsTracker _tracker;
public static AnalyticsTracker Tracker
{
get
{
if (null == _tracker)
{
AnalyticsTrackerCreator creator = new
GACreator("YourPropertyId");
_tracker = creator.Instance;
}
return _tracker;
}
}
}
Make sure to replace YourPropertyId above with the Id you have created on GA portal. If you do not know how to do that, check the previous post. Now we can start instrumenting the app with tracking events. Since we already have App.cs file open, lets add a track method that will be called when unhandled exception occurs in the app.
public partial class App : Application
{
// Code to execute on Unhandled Exceptions
private void Application_UnhandledException(object sender,
ApplicationUnhandledExceptionEventArgs e)
{
if (System.Diagnostics.Debugger.IsAttached)
{
// An unhandled exception has occurred; break into the debugger
System.Diagnostics.Debugger.Break();
}
else
{
App.Tracker.Track(EventCategories.Exception,
EventAction.ExceptionUnhandled);
}
}
}
Once the app experiences a crash the event along with custom variables will be sent to Google Analytics and in several minutes it will show up on the web portal. This is good enough for scenarios that do not require real-time tracking. However, we may be interested to know how many people are using the app or a particular feature of the app at this moment. For those type of scenarios we need to use the real-time tracking mechanism. Let's add it to the OnNavigatedTo method on the main page.
    public partial class MainPage : PhoneApplicationPage
{
protected override void OnNavigatedTo(NavigationEventArgs e)
{
App.Tracker.TrackRelatime(e.Uri);
base.OnNavigatedTo(e);
}
}
As soon as OnNavigatedTo method is invoked and TrackRealtime method is called, Google Analytics will report presence of a user on the MainPage.xaml page. Go to the web portal and witness the magic. :)


Conclusion
Instrumenting an app with provider independent framework has never been easier. Even though it currently supports only Google Analytics, other providers can be easily added. Am I going to add any new ones? I do not have any plans for now. If I decide to switch to a new provider then I would definitely add it. If you prefer a different provider and are willing to contribute to the project, I would be more than happy to work with you in extending the nuget package.
Let me know what you think in the comments below. COMPUTERS NEWS
https://nandncomputers.blogspot.com/
Motorola ROKR E8 Unlocked ATT TMobile MP3 Cam-Video Cell Phone - $119
https://nandncomputers.blogspot.com/2009/09/motorola-rokr-e8-unlocked-att-tmobile.html
Professional Social Network-A Must for Today's Professionals
https://nandncomputers.blogspot.com/2011/08/professional-social-network-must-for.html
Useful Microsoft Excel keyboard shortcut..!!!
https://nandncomputers.blogspot.com/2012/06/useful-microsoft-excel-keyboard-shortcut.html
How to Automatically Shrink url of ADF.ly || Earn Money By ADF.ly
https://nandncomputers.blogspot.com/2013/12/how-to-automatically-shrink-url-of.html