baker icon indicating copy to clipboard operation
baker copied to clipboard

Anyone using Countly?

Open nin9creative opened this issue 11 years ago • 17 comments

For Analytics in Baker?

nin9creative avatar Jul 22 '13 15:07 nin9creative

@nin9creative - This looks really promising for Baker because we all would like to see what people are doing in our app! Also from a business perspective if you're planning on selling ad space within your magazine you're going to need some form of analytics to show advertisers your app demographics and page views.

Thanks for that one Andrew. I'm going to play around with their server to see what it will behold!

fturner19 avatar Jul 22 '13 15:07 fturner19

There is always the Google Analytics route which I've played with - however I like the Countly system as it's pretty comprehensive... Plus I like that it's Open Source :)

Andrew

nin9creative avatar Jul 22 '13 15:07 nin9creative

Likewise, Open Source is the best because we can jump in and contribute to the build as well!

fturner19 avatar Jul 22 '13 15:07 fturner19

I'm planning on recording a screencast / tutorial on how to setup a self hosted Count.ly instance for those looking to incorporate it into their Baker applications.

Using a Digital Ocean $5 per month Droplet (VPS), you can setup a pretty nice Analytics option for your Baker application! I know that Count.ly offers a cloud based option as well for those that don't want to deal with their own hosting - but it's significantly more expensive than what you can setup on your own using Digital Ocean.

www.digitalocean.com

I just ran through the setup myself and it was pretty simple to setup.

7-22-2013 11-30-49 am

nin9creative avatar Jul 22 '13 16:07 nin9creative

I'm using Flurry analytics in my app. It was easy to integrate and seems to offer everything I need. It's also hosted by Flurry and free.

On Tue, Jul 23, 2013 at 2:32 AM, Andrew [email protected] wrote:

I'm planning on recording a screencast / tutorial on how to setup a self hosted Count.ly instance for those looking to incorporate it into their Baker applications.

Using a Digital Ocean $5 per month Droplet (VPS), you can setup a pretty nice Analytics option for your Baker application! I know that Count.ly offers a cloud based option as well for those that don't want to deal with their own hosting - but it's significantly more expensive than what you can setup on your own using Digital Ocean.

www.digitalocean.com

I just ran through the setup myself and it was pretty simple to setup.

[image: 7-22-2013 11-30-49 am]https://f.cloud.github.com/assets/449883/836278/2acacc8e-f2ec-11e2-8b65-2391f3ca29f9.png

— Reply to this email directly or view it on GitHubhttps://github.com/Simbul/baker/issues/1037#issuecomment-21356931 .

Nathan Feiglin

nfeiglin avatar Jul 23 '13 01:07 nfeiglin

@nfeiglin - Sure there are a bunch of options for Analytics.

I did a screencast of setting up Count.ly on the MagRocket blog for those that are inclined to play around with it for themselves.

http://blog.magrocket.com/setting-up-countly-analytics/

nin9creative avatar Jul 23 '13 15:07 nin9creative

@nin9creative - I'm all set up with countly thanks to you Andrew. Also I used your link on your blog for an account with Digital Ocean as well. With this service my company can start to make some really good decisions regarding our apps and games. screen-shot-2013-07-24-at-6 30 20-pm

fturner19 avatar Jul 24 '13 22:07 fturner19

Cool ;)

Regards, Andrew

Sent from my iPhone

On Jul 24, 2013, at 5:38 PM, Fredrick Turner [email protected] wrote:

@nin9creative - I'm all set up with countly thanks to you Andrew. Also I used your link on your blog for an account with them as well. With this service my company can start to make some really good decisions regarding our apps and games.

— Reply to this email directly or view it on GitHub.

nin9creative avatar Jul 24 '13 23:07 nin9creative

@nin9creative - Have you added any "Events" to Countly to check and if so how did you go about setting them up. There's not a lot of documentation on setting them up. I've also started to brand my version of Countly with my company logo and links. screen shot 2013-07-28 at 4 50 45 pm

fturner19 avatar Jul 28 '13 21:07 fturner19

I haven't yet, was planning on doing it soon and possibly screen recording etc...

Regards, Andrew

Sent from my iPhone

On Jul 28, 2013, at 4:33 PM, Fredrick Turner [email protected] wrote:

@nin9creative - Have you added any "Events" to C

ountly to check and if so how did you go about setting them up. There's not a lot of documentation on setting them up. I've also started to brand my version of Countly with my company logo and links.

— Reply to this email directly or view it on GitHub.

nin9creative avatar Jul 28 '13 21:07 nin9creative

Awesome, I'll love to see how you edit countly to add custom events!

fturner19 avatar Jul 28 '13 21:07 fturner19

@fturner19

Also for reference - here is some of the docs on the SDK from Countly https://github.com/osoner/countly-documentation/blob/master/reference/sdk-methods-for-custom-events.md

I may go through this further in the week to add more events that I think are important, however to add a custom event is quite simple. The first thing to do after you have Countly setup is add the #import "Countly.h" definition to any of the Baker Code files that contain the bits of code you want to record events for. In this example I'm going to be looking in the ShelfViewController.m code file.

Say for example we want to know how many times a specific issue has been opened in the Baker application...

Countly provides a simple method call recordEvent

We could use this code. It will record an event called "OpenIssue" and add a count of 1 to the existing statistics for that event.

In the readIssue method in **ShelfViewController.m" I could add this within the if (book) {} block before the pushViewControllerWithBook:book call.

[[Countly sharedInstance] recordEvent:@"OpenIssue" count:1];

Now that's great and all, but it doesn't give me the granularity that I want. I actually want to know which book/issue was opened - not just that it occurred generally.

Countly provides a way to do this with Segmentations. Segmentation is basically just grouping the events by certain more granular bits. In this instance what I really want to see is the OpenIssue event logged with the Name of the Issue/Book also recorded as part of the statistics.

Countly offers another version of the recordEvent method that takes in a Dictionary of Key Value pairs (1 or more) that allow us to further segment our event. You can actually create multiple layers if you'd like but here we are just going to add the segmentation for Issue

First lets create a dictionary... You can see I'm adding Issue and passing in the value of the book.title

NSDictionary * dict = [NSDictionary dictionaryWithObjectsAndKeys: book.title, @"Issue",nil];

Now, let's record that

[[Countly sharedInstance] recordEvent:@"Open Issue" segmentation:dict count:1];

Now, just a quick note if you go through and test this. The events are logged with a timer delay and are queued up within the Countly Library. So don't expect them to show up instantaneously. When I was testing it took like a minute or so to show up on the backend.

Logging into my Countly instance I can drill down into the Events menu on the left now.

countly 2

Now you can see that there is a custom event called "Open Issue", when selecting that I can see a drop down of segmentations (only one here called "Issue") - then you can see the count. I opened two issues for "A Study in Scarlet" which were recorded.

Here is the full bit of code (don't forget the Import "Countly.h" at the top of the file) in the ShelfViewController.m file to make it work.

- (void)readIssue:(BakerIssue *)issue
{
    BakerBook *book = nil;
    NSString *status = [issue getStatus];

    #ifdef BAKER_NEWSSTAND
    if ([status isEqual:@"opening"]) {
        book = [[[BakerBook alloc] initWithBookPath:issue.path bundled:NO] autorelease];
        if (book) {
            NSDictionary * dict = [NSDictionary dictionaryWithObjectsAndKeys: book.title, @"Issue",nil];

            [[Countly sharedInstance] recordEvent:@"Open Issue" segmentation:dict count:1];

            [self pushViewControllerWithBook:book];
        } else {
            NSLog(@"[ERROR] Book %@ could not be initialized", issue.ID);
            issue.transientStatus = BakerIssueTransientStatusNone;
            // Let's refresh everything as it's easier. This is an edge case anyway ;)
            for (IssueViewController *controller in issueViewControllers) {
                [controller refresh];
            }
            [Utils showAlertWithTitle:NSLocalizedString(@"ISSUE_OPENING_FAILED_TITLE", nil)
                          message:NSLocalizedString(@"ISSUE_OPENING_FAILED_MESSAGE", nil)
                      buttonTitle:NSLocalizedString(@"ISSUE_OPENING_FAILED_CLOSE", nil)];
        }
    }
    #else
    if ([status isEqual:@"bundled"]) {
        book = [issue bakerBook];
        [self pushViewControllerWithBook:book];
    }
    #endif
}

nin9creative avatar Jul 29 '13 03:07 nin9creative

@nin9creative - I checking your code edits now!

fturner19 avatar Jul 29 '13 04:07 fturner19

@nin9creative - I'm up and running, :+1: screen-shot-2013-07-29-at-12 32 56-am

fturner19 avatar Jul 29 '13 04:07 fturner19

http://blog.magrocket.com/custom-events-with-countly-analytics/

nin9creative avatar Aug 06 '13 19:08 nin9creative

Twitted ;-)

CountlyAnalytics avatar Aug 06 '13 21:08 CountlyAnalytics

yep , I am getting to it

On Mon, Jul 22, 2013 at 10:04 AM, Andrew [email protected] wrote:

For Analytics in Baker?

— Reply to this email directly or view it on GitHubhttps://github.com/Simbul/baker/issues/1037 .

Appmantx avatar Aug 06 '13 22:08 Appmantx