Thursday, July 30, 2015

Unexpected Windows Phone errors

I've been updating an app that targets WP8.0.
With a couple of hours spare I've been looking through the dev center health reports to see if there are any exceptions occurring that I can do anything about.
It seems that I'm not be defensive enough in my coding and previously didn't allow for things that should never happen from happening. :S

Yes, really.

Even if it's not displayed an app should always have one tile, the "primary tile" that can be accessed in code so it can be updated.
Like this:

var primaryTile = ShellTile.ActiveTiles.First();

Except when it can't.

According to the stack traces, the above has failed.
The lesson? Always use `FirstOrDefault()` even when there should always be at least one and you want the first.

A page has a State dictionary that can be used for storing details while the app is deactivated/tombstoned.

You should always be able to access it and it should always exist:

protected override void OnNavigatedTo(NavigationEventArgs e)
    if (this.State.Count > 0) 

But then, apparently (according to the exception details) there may be an exception when accessing the `State` property.

For an app with over a million installs the number of times the above have happened is incredibly small but may be worth noting if you want to be super robust in your code. Of course, if you not busy with Windows 10 related things ;)

Wednesday, July 15, 2015

My CTR has gone down - but I'm not concerned

Here's my CTR for the two weeks before and after I switched to real-time bidding for one of my AdDuplex campaigns.

I've dropped from an average of 1.8% to 1.2%. That's down by a third!

Is this a bad thing?

If CTR was what i was most interested in then I'd be concerned.
Many people would be very worried about this change.

However, here's the important thing.
Over the time period I spent the same budget every day and the clicks did this:

For the same budget, the number of clicks went from an average of 184 to 290. That's an increase of 57%. This is a very good thing.

On its own, CTR is a potentially misleading statistic as it doesn't show the whole picture. Without knowledge of the number of impressions CTR is meaningless. A high CTR from a low number of impressions could be a lot less than a low CTR from a very high number of impressions.

My ultimate aim from buying the advertising is to increase the number of downloads I get. Clicks are a proxy for this figure as the store won't yet tell me where referrals come from. Without the store listing changing over this entire period I can assume that the conversion of people clicking on the ad to eventually installing the app has remained constant.

CTR is indicative of a means to an end. Don't be deceived into thinking this is what ultimately matters. It's the return on investment that's should be monitored and in this case that means clicks.