public class WebAnalyticsParamSpecificTransformer extends WebAnalyticsTransformer
WebAnalyticsTransformer
that only measures based on filterParam
over the HttpServletRequest
.#predicate
works as a filter. If the filterParam
value exists in session or user-agent cookie, it will not consider as new.filterParam
is Googles utm_campaign, to identify if the user-agent or session is new "for" the campaign or not.IS_NEW_SESSION, IS_NEW_USER_AGENT, IS_WEB_REQUEST, tokenId
Constructor and Description |
---|
WebAnalyticsParamSpecificTransformer() |
Modifier and Type | Method and Description |
---|---|
protected Boolean |
checkNewSession(javax.servlet.http.HttpServletRequest req) |
protected Boolean |
checkNewUserAgent(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
String |
getFilterParam()
The Parameter key to use to check if the request has been made before for session or user-agent
|
protected javax.servlet.http.Cookie |
setCookie(javax.servlet.http.Cookie currentCookie,
javax.servlet.http.HttpServletResponse resp) |
void |
setFilterParam(String filterParam)
The Parameter key to use to check if the request has been made before for session or user-agent
|
getCookie, transform
public WebAnalyticsParamSpecificTransformer()
protected Boolean checkNewSession(javax.servlet.http.HttpServletRequest req)
checkNewSession
in class WebAnalyticsTransformer
protected Boolean checkNewUserAgent(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
checkNewUserAgent
in class WebAnalyticsTransformer
protected javax.servlet.http.Cookie setCookie(javax.servlet.http.Cookie currentCookie, javax.servlet.http.HttpServletResponse resp)
setCookie
in class WebAnalyticsTransformer
currentCookie
- as Cookie
, @nullable true, if no cookie currently existsresp
- as HttpServletResponse
public String getFilterParam()
public void setFilterParam(String filterParam)
Copyright © 2018. All rights reserved.