06-30-2011 05:34 PM
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().onButtonClic
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?
Solved! Go to Solution.
06-30-2011 06:28 PM
06-30-2011 06:33 PM
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)
06-30-2011 08:55 PM - edited 06-30-2011 08:57 PM
I'm sorry, I think previous my post is actually irrelevant and I misread your OP ![]()
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.
07-04-2011 09:28 AM
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?
07-05-2011 03:14 PM
I'll check with Webtrends as this does look like a bug in that method specifically.
07-13-2011 02:31 PM
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.
07-13-2011 07:09 PM
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.
08-09-2011 11:35 AM
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());
}