Closed janezomgzomg closed 8 years ago
Should we just use Snowplow? I've got it pretty well abstracted at this point as an Angular service.
I thought snowplow has backend requirements? View is mostly frontend, and (mostly) deployable without a backend.
Is that not the case?
It doesn't have backend requirements, @JoshEllinger. It's a slightly different endpoint, but still accessible.
think this looks great! passing to @arijitdasgupta for second review. Also the snowplow is in another issue, so as not to mess with the functionality here.
Looks great. Works nicely.
Other than my previous comment on code about postSignal
function implementation, this is ready to go. š
@arijitdasgupta I've gotten rid of the redundant doc
in postSignal
.
š„ It's ready!
lw_url
position
- positionpage
head_field
language
platform
user_agent
user_name
position
is passed down into the document directive fromdocument-list
. It returns the value ofgetDocPosition
which returns the index of the document in the current document result list.postSignal
function arelw_url
,position
andpage
. The get appended todata.params
inSignalsService.postClickSignal
.getNormalizedCurrentPage
toPaginateService
. The value of the current page number is normalized wrt 1.SignalsService.postClickSignal
are:head_field
language
platform
user_agent
user_name
ClientStatsService
with the following functions:getBrowserLanguage
- returns language and locale of the browsergetBrowserPlatform
- returns browser platformgetBrowserUserAgent
- returns user agent__signals_doc_id__
has been set with the value ofdoc.id
EDIT:
doc
andlw_url
will be passed in via the function call in the templateposition
andpage
will be added to the options obj in the controllerSignalService.postClickSignal
will be called in thepostSignal
function in the controller with the required parameterspostSignal
call in the template is readable.