Hi All,
In standard (non-heritic) web application frameworks, simple access logging is quite useful to find out how your app is used in the wild. The problem with Seaside is that most requests look pretty much the same and do not contain enough information for after the fact analysis (like http://localhost:8081/welcome?_s=0Sq2_xUpMPSWMOBg.R1&_k=DKeQJiyN2-ye2wCA doesn't say we're on the configuration page). Has anyone already 'solved' this 'problem' with some clever hack ? Maybe some filter in the right place with some reflection magic ? I guess manually inserting log statements (like augmenting the URL) would be one way... Thx, Sven _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi,
What I've already 'hacked' in seaside is decorating all callbacks that can happen. I've used the decorating to capture all errors during callbacks and collect them and show them on a notificationarea.
my code is at: http://www.squeaksource.com/NotificationsArea
Maybe you can use the same trick to log all callbacks? Kind Regards, Bart On Mon, Aug 23, 2010 at 11:57 PM, Sven Van Caekenberghe <[hidden email]> wrote: Hi All, -- imagination is more important than knowledge - Albert Einstein Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein The true sign of intelligence is not knowledge but imagination. - Albert Einstein However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
I would avoid web server logging in favour of modern tools like Google Analytics, which allow you to track user’s activity via variety of dimensions, one of which is, obviously, page’s URL. The following extract from one of our apps shows rendering of GA tracking code from updateRoot: that supports custom URL and multiple trackers (in our case we CC clients’ GA accounts using multiple tracker functionality new to asynchronous GA), but the key here is _trackPageview option which you can set to whatever free-form URL you choose instead of default Seaside’s URL. You can also add event tracking to all your links/buttons or otherwise apply a variety of options GA offers to suit your needs, http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html updateRoot: aHtmlRoot […] self session useAnalytics ifTrue: [aHtmlRoot javascript with: (String streamContents: [:ws | self renderAnalyticsOn: ws])]. […] renderAnalyticsOn: stream | trackers options | trackers := (Dictionary new) at: '' put: 'UA-XXXXXXX-XX'; at: 'b.' put: 'UA-ZZZZZZZ-ZZ'; yourself. options := OrderedCollection new. trackers keysAndValuesDo: [:tracker :accountid | | forThirdParty | forThirdParty := tracker notEmpty. options add: (Array with: tracker , '_setAccount' with: accountid). forThirdParty ifTrue: [options add: (Array with: tracker , '_setDomainName' with: 'none'); add: (Array with: tracker , '_setAllowLinker' with: true); add: (Array with: tracker , '_setAllowHash' with: false)]. options add: (Array with: tracker , '_trackPageview' with: '/' , task trackingURL)]. stream nextPutAll: 'var _gaq = _gaq || [];'; nextPutAll: '_gaq.push('. options do: [:ea | stream json: ea] separatedBy: [stream nextPut: $,]. stream nextPutAll: ');'. stream nextPutAll: '(function() {'; nextPutAll: 'var ga = document.createElement(''script''); ga.type = ''text/javascript''; ga.async = true;'; nextPutAll: 'ga.src = (''https:'' == document.location.protocol ? ''https://ssl'' : ''http://www'') + ''.google-analytics.com/ga.js'';'; nextPutAll: 'var s = document.getElementsByTagName(''script'')[0]; s.parentNode.insertBefore(ga, s);'; nextPutAll: '})();'. -Boris -- DeepCove Labs Ltd. +1 (604) 689-0322 4th floor, 595 Howe Street Vancouver, British Columbia Canada V6C 2T5 http://tinyurl.com/r7uw4 PacNet Services (Europe) Ltd. +353 (0)61 714-360 Shannon Airport House, SFZ County Clare, Ireland http://tinyurl.com/y952amr CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. From: [hidden email] [mailto:[hidden email]] On Behalf Of Bart Gauquie Hi, What I've already 'hacked' in seaside is decorating all callbacks that can happen. I've used the decorating to capture all errors during callbacks and collect them and show them on a notificationarea. my code is at: http://www.squeaksource.com/NotificationsArea Maybe you can use the same trick to log all callbacks? Kind Regards, Bart On Mon, Aug 23, 2010 at 11:57 PM, Sven Van Caekenberghe <[hidden email]> wrote: Hi All,
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Bart Gauquie
Hi Bart,
I am trying to understand your code but I am having some trouble finding my way ;-) Anyway, is "decorating your callbacks" a manual process that you have to do for each callbaclk ? If so, that would not really solve my problem... Thx for the reply! Sven On 24 Aug 2010, at 08:13, Bart Gauquie wrote: > Hi, > > What I've already 'hacked' in seaside is decorating all callbacks that can happen. > I've used the decorating to capture all errors during callbacks and collect them and show them on a notificationarea. > my code is at: http://www.squeaksource.com/NotificationsArea > > Maybe you can use the same trick to log all callbacks? > > Kind Regards, > > Bart > > On Mon, Aug 23, 2010 at 11:57 PM, Sven Van Caekenberghe <[hidden email]> wrote: > Hi All, > > In standard (non-heritic) web application frameworks, simple access logging is quite useful to find out how your app is used in the wild. The problem with Seaside is that most requests look pretty much the same and do not contain enough information for after the fact analysis (like http://localhost:8081/welcome?_s=0Sq2_xUpMPSWMOBg.R1&_k=DKeQJiyN2-ye2wCA doesn't say we're on the configuration page). > > Has anyone already 'solved' this 'problem' with some clever hack ? Maybe some filter in the right place with some reflection magic ? > > I guess manually inserting log statements (like augmenting the URL) would be one way... > > Thx, > > Sven > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > -- > imagination is more important than knowledge - Albert Einstein > Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein > Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein > The true sign of intelligence is not knowledge but imagination. - Albert Einstein > However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill > It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Hi Boris,
On 24 Aug 2010, at 11:16, Boris Popov, DeepCove Labs (SNN) wrote: > I would avoid web server logging in favour of modern tools like Google Analytics, which allow you to track user’s activity via variety of dimensions, one of which is, obviously, page’s URL. The following extract from one of our apps shows rendering of GA tracking code from updateRoot: that supports custom URL and multiple trackers (in our case we CC clients’ GA accounts using multiple tracker functionality new to asynchronous GA), but the key here is _trackPageview option which you can set to whatever free-form URL you choose instead of default Seaside’s URL. You can also add event tracking to all your links/buttons or otherwise apply a variety of options GA offers to suit your needs, > > http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html > > updateRoot: aHtmlRoot > […] > self session useAnalytics > ifTrue: [aHtmlRoot javascript with: (String streamContents: [:ws | self renderAnalyticsOn: ws])]. > […] > > renderAnalyticsOn: stream > > | trackers options | > trackers := (Dictionary new) > at: '' put: 'UA-XXXXXXX-XX'; > at: 'b.' put: 'UA-ZZZZZZZ-ZZ'; > yourself. > options := OrderedCollection new. > trackers keysAndValuesDo: > [:tracker :accountid | > | forThirdParty | > forThirdParty := tracker notEmpty. > options add: (Array with: tracker , '_setAccount' with: accountid). > forThirdParty > ifTrue: > [options > add: (Array with: tracker , '_setDomainName' with: 'none'); > add: (Array with: tracker , '_setAllowLinker' with: true); > add: (Array with: tracker , '_setAllowHash' with: false)]. > options add: (Array with: tracker , '_trackPageview' with: '/' , task trackingURL)]. > stream > nextPutAll: 'var _gaq = _gaq || [];'; > nextPutAll: '_gaq.push('. > options do: [:ea | stream json: ea] separatedBy: [stream nextPut: $,]. > stream nextPutAll: ');'. > stream > nextPutAll: '(function() {'; > nextPutAll: 'var ga = document.createElement(''script''); ga.type = ''text/javascript''; ga.async = true;'; > nextPutAll: 'ga.src = (''https:'' == document.location.protocol ? ''https://ssl'' : ''http://www'') + ''.google-analytics.com/ga.js'';'; > nextPutAll: 'var s = document.getElementsByTagName(''script'')[0]; s.parentNode.insertBefore(ga, s);'; > nextPutAll: '})();'. > > -Boris Thx for the reply. I understand your approach (even though I am not that deep into GA). Still, the code you highlighted in red, task trackingURL, is that a method that you have to implement manually ? I am looking for some hack that would log something meaningfull automagically ;-) Sven _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
I guess you'd need to come up with a way of defining "meaningful" and
then use that to generate a URL... In other words, say you have a page that shows 3 components: A, B and C. What would you like to see in your URL given that this isn't like PHP where you'll have /signup.php and /checkout.php etc? Then, say component B calls component D, what would you like your URL to be then? If your application is controlled by the task, it might be a touch simpler to define such rules as you could just change your "URL" manually as you move through it in either direction. -Boris -- DeepCove Labs Ltd. +1 (604) 689-0322 4th floor, 595 Howe Street Vancouver, British Columbia Canada V6C 2T5 http://tinyurl.com/r7uw4 PacNet Services (Europe) Ltd. +353 (0)61 714-360 Shannon Airport House, SFZ County Clare, Ireland http://tinyurl.com/y952amr CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Sven Van Caekenberghe Sent: 24 August 2010 11:14 To: Seaside - general discussion Subject: Re: [Seaside] Seaside Access/Activity Logging Hi Boris, On 24 Aug 2010, at 11:16, Boris Popov, DeepCove Labs (SNN) wrote: > I would avoid web server logging in favour of modern tools like Google Analytics, which allow you to track user's activity via variety of dimensions, one of which is, obviously, page's URL. The following extract from one of our apps shows rendering of GA tracking code from updateRoot: that supports custom URL and multiple trackers (in our case we CC clients' GA accounts using multiple tracker functionality new to asynchronous GA), but the key here is _trackPageview option which you can set to whatever free-form URL you choose instead of default Seaside's URL. You can also add event tracking to all your links/buttons or otherwise apply a variety of options GA offers to suit your needs, > > http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html > > updateRoot: aHtmlRoot > [...] > self session useAnalytics > ifTrue: [aHtmlRoot javascript with: (String streamContents: [:ws | self renderAnalyticsOn: ws])]. > [...] > > renderAnalyticsOn: stream > > | trackers options | > trackers := (Dictionary new) > at: '' put: 'UA-XXXXXXX-XX'; > at: 'b.' put: 'UA-ZZZZZZZ-ZZ'; > yourself. > options := OrderedCollection new. > trackers keysAndValuesDo: > [:tracker :accountid | > | forThirdParty | > forThirdParty := tracker notEmpty. > options add: (Array with: tracker , '_setAccount' with: accountid). > forThirdParty > ifTrue: > [options > add: (Array with: tracker , '_setDomainName' with: 'none'); > add: (Array with: tracker , '_setAllowLinker' with: true); > add: (Array with: tracker , '_setAllowHash' with: false)]. > options add: (Array with: tracker , '_trackPageview' with: '/' , task trackingURL)]. > stream > nextPutAll: 'var _gaq = _gaq || [];'; > nextPutAll: '_gaq.push('. > options do: [:ea | stream json: ea] separatedBy: [stream nextPut: $,]. > stream nextPutAll: ');'. > stream > nextPutAll: '(function() {'; > nextPutAll: 'var ga = document.createElement(''script''); ga.type = ''text/javascript''; ga.async = true;'; > nextPutAll: 'ga.src = (''https:'' == document.location.protocol ? ''https://ssl'' : ''http://www'') + ''.google-analytics.com/ga.js'';'; > nextPutAll: 'var s = document.getElementsByTagName(''script'')[0]; s.parentNode.insertBefore(ga, s);'; > nextPutAll: '})();'. > > -Boris Thx for the reply. I understand your approach (even though I am not that deep into GA). Still, the code you highlighted in red, task trackingURL, is that a method that you have to implement manually ? I am looking for some hack that would log something meaningfull automagically ;-) Sven _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Sven Van Caekenberghe
Hi Sven,
You don't have to to each callback manually. It goes automatically. Let me try to explain a bit.
with:
starts decorating the html context (which will be used further for each rendering object in the component tree) with NARenderContextDecorator
This one delegates all methods except: NARenderContextDecorator>>c allbacks
which in turn decorates NACallbackRegistryDecorator, and then NACallbackRegistryDecorator>>store: aCallback
which gives you: NACallbackDecorator>>evaluateWithFieldValues: anOrderedCollection
this evaluateWithFieldValues: will be called during a callback now I'm using it to capture errors during callback and continue. You could log each callback ... instead of my code. I'm planning to extract this decorated thing into a separate package, but did not find the time for it yet. This notificationsArea is in use on: BkbagGemstoneTesting: BkbagGemstoneTesting-Presentation>>AnimalRoot>>initialize
and in SunnysidePlanning2: SunnysidePlanning2-View-Root>>SunnysidePlanning2WorkAreaView>>initialize
Hope this makes it somewhat clearer. Kind Regards, Bart On Tue, Aug 24, 2010 at 12:10 PM, Sven Van Caekenberghe <[hidden email]> wrote: Hi Bart, -- imagination is more important than knowledge - Albert Einstein Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein The true sign of intelligence is not knowledge but imagination. - Albert Einstein However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Bart,
Thanks for the detailed explanation. I'll need some time to digest all this. As I said in this thread: I am not yet sure what I am looking for, I was more thinking aloud. Your approach sure sounds interesting. Sven On 24 Aug 2010, at 12:43, Bart Gauquie wrote: > Hi Sven, > > You don't have to to each callback manually. It goes automatically. Let me try to explain a bit. > NotificationsAreaDecoration is a decoration you put around your root component. > NotificationsAreaDecoration>>renderContentOn: html > (self shouldRenderNotificationArea) > ifTrue: [self renderNotificationAreaOn: html]. > [self next renderUndecoratedWithContext: > (NARenderContextDecorator decorated: html context using: self)] > on: NotificationsAreaDecorationRequest > do: [:aNotificationRequest|aNotificationRequest resume: self]. > > with: > [self next renderUndecoratedWithContext: > (NARenderContextDecorator decorated: html context using: self)] > > starts decorating the html context (which will be used further for each rendering object in the component tree) with NARenderContextDecorator > > This one delegates all methods except: > NARenderContextDecorator>>callbacks > ^NACallbackRegistryDecorator decorated: decorated callbacks using: notificationsAreaDecoration. > which in turn decorates NACallbackRegistryDecorator, and then > NACallbackRegistryDecorator>>store: aCallback > ^decorated store: (NACallbackDecorator decorated: aCallback using: notificationsAreaDecoration) > which gives you: > NACallbackDecorator>>evaluateWithFieldValues: anOrderedCollection > ^[notificationsAreaDecoration evaluateCapturingNotificationsOrErrors: > [decorated evaluateWithFieldValues: anOrderedCollection]] > on: NotificationsAreaDecorationRequest > do: [:request|request resume: notificationsAreaDecoration] > > this evaluateWithFieldValues: will be called during a callback > now I'm using it to capture errors during callback and continue. > You could log each callback ... instead of my code. > > I'm planning to extract this decorated thing into a separate package, but did not find the time for it yet. > This notificationsArea is in use on: > BkbagGemstoneTesting: > BkbagGemstoneTesting-Presentation>>AnimalRoot>>initialize > super initialize. > animalOverview := AnimalOverview new. > self addDecoration: > (NotificationsAreaDecoration new > captureErrorOfType: MAValidationError; > yourself) > > and in SunnysidePlanning2: > SunnysidePlanning2-View-Root>>SunnysidePlanning2WorkAreaView>>initialize > super initialize. > self addDecoration: > (NotificationsAreaDecoration new > captureNotificationOfType: SP2Notification; > captureErrorOfType: SP2Error; > errorInnerDivClass: 'error'; > notificationInnerDivClass: 'success'; > shouldRenderNotificationArea: false; > notificationAreaDivClass: 'span-18 last'; > yourself). > self session announcer > when: SetAsMainView > do: [:ann | root := ann component]. > root := KiesProductBacklogTask new. > > > Hope this makes it somewhat clearer. > > Kind Regards, > Bart > On Tue, Aug 24, 2010 at 12:10 PM, Sven Van Caekenberghe <[hidden email]> wrote: > Hi Bart, > > I am trying to understand your code but I am having some trouble finding my way ;-) > Anyway, is "decorating your callbacks" a manual process that you have to do for each callbaclk ? > If so, that would not really solve my problem... > > Thx for the reply! > > Sven > > On 24 Aug 2010, at 08:13, Bart Gauquie wrote: > > > Hi, > > > > What I've already 'hacked' in seaside is decorating all callbacks that can happen. > > I've used the decorating to capture all errors during callbacks and collect them and show them on a notificationarea. > > my code is at: http://www.squeaksource.com/NotificationsArea > > > > Maybe you can use the same trick to log all callbacks? > > > > Kind Regards, > > > > Bart > > > > On Mon, Aug 23, 2010 at 11:57 PM, Sven Van Caekenberghe <[hidden email]> wrote: > > Hi All, > > > > In standard (non-heritic) web application frameworks, simple access logging is quite useful to find out how your app is used in the wild. The problem with Seaside is that most requests look pretty much the same and do not contain enough information for after the fact analysis (like http://localhost:8081/welcome?_s=0Sq2_xUpMPSWMOBg.R1&_k=DKeQJiyN2-ye2wCA doesn't say we're on the configuration page). > > > > Has anyone already 'solved' this 'problem' with some clever hack ? Maybe some filter in the right place with some reflection magic ? > > > > I guess manually inserting log statements (like augmenting the URL) would be one way... > > > > Thx, > > > > Sven > > > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > -- > > imagination is more important than knowledge - Albert Einstein > > Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein > > Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein > > The true sign of intelligence is not knowledge but imagination. - Albert Einstein > > However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill > > It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > -- > imagination is more important than knowledge - Albert Einstein > Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein > Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein > The true sign of intelligence is not knowledge but imagination. - Albert Einstein > However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill > It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Boris Popov, DeepCove Labs (SNN)
You're absolutely right, Boris, I need to think about what I really want. I guess want you want from analytics is to know what a user did in his session, what most users do most of their time, where there are problems with slow responses, ... stuff like that. But 'where' is hard to define, especially these days with web 2.0
Thanks for the feedback. On 24 Aug 2010, at 12:18, Boris Popov, DeepCove Labs (SNN) wrote: > I guess you'd need to come up with a way of defining "meaningful" and > then use that to generate a URL... In other words, say you have a page > that shows 3 components: A, B and C. What would you like to see in your > URL given that this isn't like PHP where you'll have /signup.php and > /checkout.php etc? Then, say component B calls component D, what would > you like your URL to be then? If your application is controlled by the > task, it might be a touch simpler to define such rules as you could just > change your "URL" manually as you move through it in either direction. > > -Boris > > -- > DeepCove Labs Ltd. > +1 (604) 689-0322 > 4th floor, 595 Howe Street > Vancouver, British Columbia > Canada V6C 2T5 > http://tinyurl.com/r7uw4 > > PacNet Services (Europe) Ltd. > +353 (0)61 714-360 > Shannon Airport House, SFZ > County Clare, Ireland > http://tinyurl.com/y952amr > > CONFIDENTIALITY NOTICE > > This email is intended only for the persons named in the message header. > Unless otherwise indicated, it contains information that is private and > confidential. If you have received it in error, please notify the sender > and delete the entire message including any attachments. > > Thank you. > > > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Sven > Van Caekenberghe > Sent: 24 August 2010 11:14 > To: Seaside - general discussion > Subject: Re: [Seaside] Seaside Access/Activity Logging > > Hi Boris, > > On 24 Aug 2010, at 11:16, Boris Popov, DeepCove Labs (SNN) wrote: > >> I would avoid web server logging in favour of modern tools like Google > Analytics, which allow you to track user's activity via variety of > dimensions, one of which is, obviously, page's URL. The following > extract from one of our apps shows rendering of GA tracking code from > updateRoot: that supports custom URL and multiple trackers (in our case > we CC clients' GA accounts using multiple tracker functionality new to > asynchronous GA), but the key here is _trackPageview option which you > can set to whatever free-form URL you choose instead of default > Seaside's URL. You can also add event tracking to all your links/buttons > or otherwise apply a variety of options GA offers to suit your needs, >> >> http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html >> >> updateRoot: aHtmlRoot >> [...] >> self session useAnalytics >> ifTrue: [aHtmlRoot javascript with: > (String streamContents: [:ws | self renderAnalyticsOn: ws])]. >> [...] >> >> renderAnalyticsOn: stream >> >> | trackers options | >> trackers := (Dictionary new) >> at: '' > put: 'UA-XXXXXXX-XX'; >> at: > 'b.' put: 'UA-ZZZZZZZ-ZZ'; >> > yourself. >> options := OrderedCollection new. >> trackers keysAndValuesDo: >> [:tracker :accountid | >> | forThirdParty | >> forThirdParty := > tracker notEmpty. >> options add: (Array > with: tracker , '_setAccount' with: accountid). >> forThirdParty >> > ifTrue: >> > [options >> > add: (Array with: tracker , '_setDomainName' with: 'none'); >> > add: (Array with: tracker , '_setAllowLinker' with: true); >> > add: (Array with: tracker , '_setAllowHash' with: false)]. >> options add: (Array > with: tracker , '_trackPageview' with: '/' , task trackingURL)]. >> stream >> nextPutAll: 'var _gaq = _gaq || [];'; >> nextPutAll: '_gaq.push('. >> options do: [:ea | stream json: ea] separatedBy: > [stream nextPut: $,]. >> stream nextPutAll: ');'. >> stream >> nextPutAll: '(function() {'; >> nextPutAll: 'var ga = > document.createElement(''script''); ga.type = ''text/javascript''; > ga.async = true;'; >> nextPutAll: 'ga.src = (''https:'' == > document.location.protocol ? ''https://ssl'' : ''http://www'') + > ''.google-analytics.com/ga.js'';'; >> nextPutAll: 'var s = > document.getElementsByTagName(''script'')[0]; > s.parentNode.insertBefore(ga, s);'; >> nextPutAll: '})();'. >> >> -Boris > > Thx for the reply. > I understand your approach (even though I am not that deep into GA). > Still, the code you highlighted in red, task trackingURL, is that a > method that you have to implement manually ? > I am looking for some hack that would log something meaningfull > automagically ;-) > > Sven > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Sophisticated event tracking can be implemented with,
http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.ht ml In theory each of your components could track its "render" event and add "click" event tracking to all elements that define callbacks. Once you start seeing some data reported online, you can then decide how you want to change it to achieve the goals that you want to achieve. Hope this helps, -Boris -- DeepCove Labs Ltd. +1 (604) 689-0322 4th floor, 595 Howe Street Vancouver, British Columbia Canada V6C 2T5 http://tinyurl.com/r7uw4 PacNet Services (Europe) Ltd. +353 (0)61 714-360 Shannon Airport House, SFZ County Clare, Ireland http://tinyurl.com/y952amr CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Sven Van Caekenberghe Sent: 24 August 2010 12:53 To: Seaside - general discussion Subject: Re: [Seaside] Seaside Access/Activity Logging You're absolutely right, Boris, I need to think about what I really want. I guess want you want from analytics is to know what a user did in his session, what most users do most of their time, where there are problems with slow responses, ... stuff like that. But 'where' is hard to define, especially these days with web 2.0 Thanks for the feedback. On 24 Aug 2010, at 12:18, Boris Popov, DeepCove Labs (SNN) wrote: > I guess you'd need to come up with a way of defining "meaningful" and > then use that to generate a URL... In other words, say you have a page > that shows 3 components: A, B and C. What would you like to see in > your URL given that this isn't like PHP where you'll have /signup.php > and /checkout.php etc? Then, say component B calls component D, what > would you like your URL to be then? If your application is controlled > by the task, it might be a touch simpler to define such rules as you > could just change your "URL" manually as you move through it in either direction. > > -Boris > > -- > DeepCove Labs Ltd. > +1 (604) 689-0322 > 4th floor, 595 Howe Street > Vancouver, British Columbia > Canada V6C 2T5 > http://tinyurl.com/r7uw4 > > PacNet Services (Europe) Ltd. > +353 (0)61 714-360 > Shannon Airport House, SFZ > County Clare, Ireland > http://tinyurl.com/y952amr > > CONFIDENTIALITY NOTICE > > This email is intended only for the persons named in the message > Unless otherwise indicated, it contains information that is private > and confidential. If you have received it in error, please notify the > sender and delete the entire message including any attachments. > > Thank you. > > > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Sven > Van Caekenberghe > Sent: 24 August 2010 11:14 > To: Seaside - general discussion > Subject: Re: [Seaside] Seaside Access/Activity Logging > > Hi Boris, > > On 24 Aug 2010, at 11:16, Boris Popov, DeepCove Labs (SNN) wrote: > >> I would avoid web server logging in favour of modern tools like > Analytics, which allow you to track user's activity via variety of > dimensions, one of which is, obviously, page's URL. The following > extract from one of our apps shows rendering of GA tracking code from > updateRoot: that supports custom URL and multiple trackers (in our > case we CC clients' GA accounts using multiple tracker functionality > new to asynchronous GA), but the key here is _trackPageview option > which you can set to whatever free-form URL you choose instead of > default Seaside's URL. You can also add event tracking to all your > links/buttons or otherwise apply a variety of options GA offers to > suit your needs, >> >> http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html >> >> updateRoot: aHtmlRoot >> [...] >> self session useAnalytics >> ifTrue: [aHtmlRoot javascript with: > (String streamContents: [:ws | self renderAnalyticsOn: ws])]. >> [...] >> >> renderAnalyticsOn: stream >> >> | trackers options | >> trackers := (Dictionary new) >> at: '' > put: 'UA-XXXXXXX-XX'; >> at: > 'b.' put: 'UA-ZZZZZZZ-ZZ'; >> > yourself. >> options := OrderedCollection new. >> trackers keysAndValuesDo: >> [:tracker :accountid | >> | forThirdParty | >> forThirdParty := > tracker notEmpty. >> options add: (Array > with: tracker , '_setAccount' with: accountid). >> forThirdParty >> > ifTrue: >> > [options >> > add: (Array with: tracker , '_setDomainName' with: 'none'); >> > add: (Array with: tracker , '_setAllowLinker' with: true); >> > add: (Array with: tracker , '_setAllowHash' with: false)]. >> options add: (Array > with: tracker , '_trackPageview' with: '/' , task trackingURL)]. >> stream >> nextPutAll: 'var _gaq = _gaq || [];'; >> nextPutAll: '_gaq.push('. >> options do: [:ea | stream json: ea] separatedBy: > [stream nextPut: $,]. >> stream nextPutAll: ');'. >> stream >> nextPutAll: '(function() {'; >> nextPutAll: 'var ga = > document.createElement(''script''); ga.type = ''text/javascript''; > ga.async = true;'; >> nextPutAll: 'ga.src = (''https:'' == > document.location.protocol ? ''https://ssl'' : ''http://www'') + > ''.google-analytics.com/ga.js'';'; >> nextPutAll: 'var s = > document.getElementsByTagName(''script'')[0]; > s.parentNode.insertBefore(ga, s);'; >> nextPutAll: '})();'. >> >> -Boris > > Thx for the reply. > I understand your approach (even though I am not that deep into GA). > Still, the code you highlighted in red, task trackingURL, is that a > method that you have to implement manually ? > I am looking for some hack that would log something meaningfull > automagically ;-) > > Sven > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Sven Van Caekenberghe
Having said that, I just noticed GA has a limit of approximately 500
requests per session, so this may not work as well as one could hope... -Boris -- DeepCove Labs Ltd. +1 (604) 689-0322 4th floor, 595 Howe Street Vancouver, British Columbia Canada V6C 2T5 http://tinyurl.com/r7uw4 PacNet Services (Europe) Ltd. +353 (0)61 714-360 Shannon Airport House, SFZ County Clare, Ireland http://tinyurl.com/y952amr CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: Boris Popov, DeepCove Labs (SNN) Sent: 24 August 2010 12:57 To: Seaside - general discussion Subject: RE: [Seaside] Seaside Access/Activity Logging Sophisticated event tracking can be implemented with, http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.ht ml In theory each of your components could track its "render" event and add "click" event tracking to all elements that define callbacks. Once you start seeing some data reported online, you can then decide how you want to change it to achieve the goals that you want to achieve. Hope this helps, -Boris -- DeepCove Labs Ltd. +1 (604) 689-0322 4th floor, 595 Howe Street Vancouver, British Columbia Canada V6C 2T5 http://tinyurl.com/r7uw4 PacNet Services (Europe) Ltd. +353 (0)61 714-360 Shannon Airport House, SFZ County Clare, Ireland http://tinyurl.com/y952amr CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Sven Van Caekenberghe Sent: 24 August 2010 12:53 To: Seaside - general discussion Subject: Re: [Seaside] Seaside Access/Activity Logging You're absolutely right, Boris, I need to think about what I really want. I guess want you want from analytics is to know what a user did in his session, what most users do most of their time, where there are problems with slow responses, ... stuff like that. But 'where' is hard to define, especially these days with web 2.0 Thanks for the feedback. On 24 Aug 2010, at 12:18, Boris Popov, DeepCove Labs (SNN) wrote: > I guess you'd need to come up with a way of defining "meaningful" and > then use that to generate a URL... In other words, say you have a page > that shows 3 components: A, B and C. What would you like to see in > your URL given that this isn't like PHP where you'll have /signup.php > and /checkout.php etc? Then, say component B calls component D, what > would you like your URL to be then? If your application is controlled > by the task, it might be a touch simpler to define such rules as you > could just change your "URL" manually as you move through it in either direction. > > -Boris > > -- > DeepCove Labs Ltd. > +1 (604) 689-0322 > 4th floor, 595 Howe Street > Vancouver, British Columbia > Canada V6C 2T5 > http://tinyurl.com/r7uw4 > > PacNet Services (Europe) Ltd. > +353 (0)61 714-360 > Shannon Airport House, SFZ > County Clare, Ireland > http://tinyurl.com/y952amr > > CONFIDENTIALITY NOTICE > > This email is intended only for the persons named in the message > Unless otherwise indicated, it contains information that is private > and confidential. If you have received it in error, please notify the > sender and delete the entire message including any attachments. > > Thank you. > > > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Sven > Van Caekenberghe > Sent: 24 August 2010 11:14 > To: Seaside - general discussion > Subject: Re: [Seaside] Seaside Access/Activity Logging > > Hi Boris, > > On 24 Aug 2010, at 11:16, Boris Popov, DeepCove Labs (SNN) wrote: > >> I would avoid web server logging in favour of modern tools like > Analytics, which allow you to track user's activity via variety of > dimensions, one of which is, obviously, page's URL. The following > extract from one of our apps shows rendering of GA tracking code from > updateRoot: that supports custom URL and multiple trackers (in our > case we CC clients' GA accounts using multiple tracker functionality > new to asynchronous GA), but the key here is _trackPageview option > which you can set to whatever free-form URL you choose instead of > default Seaside's URL. You can also add event tracking to all your > links/buttons or otherwise apply a variety of options GA offers to > suit your needs, >> >> http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html >> >> updateRoot: aHtmlRoot >> [...] >> self session useAnalytics >> ifTrue: [aHtmlRoot javascript with: > (String streamContents: [:ws | self renderAnalyticsOn: ws])]. >> [...] >> >> renderAnalyticsOn: stream >> >> | trackers options | >> trackers := (Dictionary new) >> at: '' > put: 'UA-XXXXXXX-XX'; >> at: > 'b.' put: 'UA-ZZZZZZZ-ZZ'; >> > yourself. >> options := OrderedCollection new. >> trackers keysAndValuesDo: >> [:tracker :accountid | >> | forThirdParty | >> forThirdParty := > tracker notEmpty. >> options add: (Array > with: tracker , '_setAccount' with: accountid). >> forThirdParty >> > ifTrue: >> > [options >> > add: (Array with: tracker , '_setDomainName' with: 'none'); >> > add: (Array with: tracker , '_setAllowLinker' with: true); >> > add: (Array with: tracker , '_setAllowHash' with: false)]. >> options add: (Array > with: tracker , '_trackPageview' with: '/' , task trackingURL)]. >> stream >> nextPutAll: 'var _gaq = _gaq || [];'; >> nextPutAll: '_gaq.push('. >> options do: [:ea | stream json: ea] separatedBy: > [stream nextPut: $,]. >> stream nextPutAll: ');'. >> stream >> nextPutAll: '(function() {'; >> nextPutAll: 'var ga = > document.createElement(''script''); ga.type = ''text/javascript''; > ga.async = true;'; >> nextPutAll: 'ga.src = (''https:'' == > document.location.protocol ? ''https://ssl'' : ''http://www'') + > ''.google-analytics.com/ga.js'';'; >> nextPutAll: 'var s = > document.getElementsByTagName(''script'')[0]; > s.parentNode.insertBefore(ga, s);'; >> nextPutAll: '})();'. >> >> -Boris > > Thx for the reply. > I understand your approach (even though I am not that deep into GA). > Still, the code you highlighted in red, task trackingURL, is that a > method that you have to implement manually ? > I am looking for some hack that would log something meaningfull > automagically ;-) > > Sven > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Tue, 24 Aug 2010 04:58:44 -0700, "Boris Popov, DeepCove Labs \(SNN\)"
<[hidden email]> wrote: > Having said that, I just noticed GA has a limit of approximately 500 > requests per session, so this may not work as well as one could hope... Just a stupid question.. Why not just use some sort of audit log that is built into the code that tracks users movement from page to page? I realize that you'll need to contiously put the auditlog calls in place but it seems like that ought to do the trick and you could effectively log whatever you wanted (session details, logged in user info, etc).. I realize that some of these other methods are just fine but... I guess there's more than one way to fillet a trout (ok -- maybe not for a trout).. :-) -- Rick _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Sven Van Caekenberghe
The biggest benefit to outside reporting tools is not having to reinvent the wheel... _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |