Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Google Analytics - track which issue is opened #1199

Closed
pmfadil opened this issue Nov 4, 2013 · 2 comments
Closed

Google Analytics - track which issue is opened #1199

pmfadil opened this issue Nov 4, 2013 · 2 comments

Comments

@pmfadil
Copy link

pmfadil commented Nov 4, 2013

Hello,

I have just implemented Google Analytics tracking within my app successfully. I would now like to be able to know which issues are being opened. I have been trying various methods in the BakerIssueOpen event but without success.

Has anyone managed to find a simple way to do this?

@DaveAtDog
Copy link

I implemented tracking issue opening like this.

else if ([[notification name] isEqualToString:@"BakerIssueOpen"])
    {
        IssueViewController *issueViewController = [notification object];

        NSString *label = [NSString stringWithFormat:@"Baker Issue Open - %@", issueViewController.issue.ID];

        [tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"ui_action"
                                                              action:@"open"
                                                               label:label
                                                               value:nil] build]];

        NSLog(@"[BakerAnalyticsEvent] label = %@", label);

    }

The receiveEvent method receives an object which in the case of "BakerIssueOpen" is the issueViewController. From there you can access the issue and ID.

@pmfadil
Copy link
Author

pmfadil commented Nov 4, 2013

Works like a charm! Thanks a lot @DaveAtDog !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants