Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry Analytics Service

Reply
Developer
dkonigs
Posts: 205
Registered: ‎07-25-2008
Accepted Solution

Screens not being logged

This could be a case of a problem with the service, or simply me mis-using the API.  Since the API parameters are not extensively documented, either is possible.

 

So in my app, I'm doing the equivalent of:

WebtrendsDataCollector.getInstance().onButtonClick("/AppHomeScreen/FooScreen", "FooScreen", "fooEvent", null);

 

When I go to the analytics website, I do see an entry on the "Events" report for "fooEvent".  However, the "Screens" report just shows application-level (forground, background, terminate) events.  What am I missing here?  How do I get the app screens to show up in the reports?  Am I incorrectly formatting some of the onButtonClick() String parameters?

Please use plain text.
Developer
dnepr
Posts: 723
Registered: ‎03-12-2009

Re: Screens not being logged

Try it like this: WebtrendsDataCollector.getInstance().onButtonClick("/AppHomeScreen/", "FooScreen", "fooEvent", null);
Please use plain text.
Developer
dkonigs
Posts: 205
Registered: ‎07-25-2008

Re: Screens not being logged

Are you basically saying that the screen path needs a training slash to be processed correctly?

 

(the API docs seem like they're all over the place, with regards to the app location path and its delimiters)

Please use plain text.
Developer
dnepr
Posts: 723
Registered: ‎03-12-2009

Re: Screens not being logged

[ Edited ]

I'm sorry, I think previous my post is actually irrelevant and I misread your OP :smileysad:

 

I haven't tested button click yet, so can't say if it has a bug.

 

From reading the OP again, your code looks inline with what I have for other WebTrends events which do get reported in Screens report.

 

 

Agreed, the documentation leaves a lot to be desired.

 

 

Please use plain text.
Developer
dkonigs
Posts: 205
Registered: ‎07-25-2008

Re: Screens not being logged

As I've continued to implement more of the API in my app, I've noticed something.  The screen name from calls to onMediaEvent() actually do get logged on the "Screens" report within the analytics website.  However, the screen name from onButtonClick() still appears to not actually be shown anywhere.

 

Also, the first parameter to any of these calls is supposed to be the path within the application to where the event occurs.  I have not seem where, if anywhere, this path is actually tracked.

 

Does anyone have comments on any of this?

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 539
Registered: ‎07-15-2008
My Carrier: Bell

Re: Screens not being logged

I'll check with Webtrends as this does look like a bug in that method specifically.

Tim Windsor
Application Development Consultant
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 539
Registered: ‎07-15-2008
My Carrier: Bell

Re: Screens not being logged

This is by design: Button clicks were determined to be an event rather than a view of a page, search result, media content, etc and are therefore not considered a screen.

 

We are getting the documentation updated to reflect that.

Tim Windsor
Application Development Consultant
Please use plain text.
Developer
dkonigs
Posts: 205
Registered: ‎07-25-2008

Re: Screens not being logged

It still would be nice if onButtonClick() could be shown with some screen data, since the same "button action" might be available from more than one place.

 

However, what is the correct way to actually log a screen view?  The entire API pretty much assumes your app is either a media player or an online store, so its not always clear how to translate from the name/parameters of a method to their more generic intended usage.

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 539
Registered: ‎07-15-2008
My Carrier: Bell

Re: Screens not being logged

I've learned there is a way to force the behaviour you desire. See the following sample to see how to override the inclusion of this event on the Screens view (for a media event, but the same will work for Buttons):

 

/* The Hashtable with a custom parameter is entirely optional */
    Hashtable customData3 = new Hashtable();
    customData3.put("WT.dl","0");
        
    try {     
        WebtrendsDataCollector.getInstance().onMediaEvent("/views/media/AliceInWonderland", "AliceInWonderland", 
        "view", customData3, "Movies", "mov", "AliceTrailer", "play");
    } catch (IllegalWebtrendsParameterValueException e) {
       /* Log an error message */
       WebtrendsDataCollector.getLog().e(e.getMessage());       

}

 

Tim Windsor
Application Development Consultant
Please use plain text.