Mike, since I didn't really understand your use case, I'm not sure a
site-wide link decorator is the best way to go. You might keep it simple and
just print a log statement when certain actions are performed, then
periodically grep through your log files to generate statistics. My
suggestion assumed you wanted to know both the "from" and "to" of each
bookmarkable link click.

Chris, I can see how that would work. I guess I'm of the opinion that Wicket
provides enough listener hooks that inheritance needn't come into the
picture. It's easy to inherit one behavior, but things can get messy when
you want to mix in multiple behaviors. If some use case requires
per-component customization as you suggest, you can throw an interface
specific to the use case onto those particular components and do some
"instanceof" checks in your application-wide listeners.

On Thu, Aug 18, 2011 at 11:23 PM, Mike Mander <[email protected]> wrote:

> Thanks Dan,
>
> my intention is to track ux with our shop. We have for instance a link you
> can configure how many
> products you see per page. Because we don't know what is the best "view
> size" we want to check
> if users use our preselection or "always" change it to other values.
>
> I will try your suggestion and post the solution (if i can :-).
>
> Thanks
> Mike
>
>  Is your goal to understand which links are used to open certain
>> bookmarkable
>> pages? If so, here's an approach that might get you started.
>>
>> Create a Behavior which appends a tracking query parameter to
>> BookmarkablePageLinks. You could add it manually to each link you want to
>> track, or apply it application-wide through
>> an IComponentOnBeforeRenderListen**er registered with
>> Application#**addPreComponentOnBeforeRenderL**istener(). Then you you'd
>> have to
>> watch for these query parameters in subsequent application requests, maybe
>> by inspecting the Request object in an Application#newRequestCycle()
>> override.
>>
>> Hope that helps,
>> Dan
>>
>> On Thu, Aug 18, 2011 at 4:51 AM, Mike Mander<[email protected]>  wrote:
>>
>>  Hi,
>>>
>>> i would like to log execution of bookmarkable page links. I know that
>>> they
>>> are only renderered in markup and call the page from the browser.
>>>
>>> Maybe someone has a hint for me here?
>>>
>>> Thanks
>>> Mike
>>>
>>> ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>> <users-unsubscribe@**wicket.apache.org<[email protected]>
>>> >
>>>
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org<[email protected]>
> For additional commands, e-mail: [email protected]
>
>

Reply via email to