Subversion Repositories SmartDukaan

Rev

Rev 3860 | Rev 5945 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3860 Rev 5466
Line 50... Line 50...
50
    
50
    
51
    private HttpServletRequest request;
51
    private HttpServletRequest request;
52
    private HttpServletResponse response;
52
    private HttpServletResponse response;
53
    private String referer;
53
    private String referer;
54
    private String affId = null;
54
    private String affId = null;
-
 
55
    private String utmSrc = null;
55
    
56
    
56
    static {
57
    static {
57
        paidAffIds = new HashSet<String>();
58
        paidAffIds = new HashSet<String>();
58
        paidAffIds.add("6");
59
        paidAffIds.add("6");
59
        paidAffIds.add("38");
60
        paidAffIds.add("38");
Line 70... Line 71...
70
    public String intercept(ActionInvocation invocation) throws Exception {
71
    public String intercept(ActionInvocation invocation) throws Exception {
71
        request = ServletActionContext.getRequest();
72
        request = ServletActionContext.getRequest();
72
        response = ServletActionContext.getResponse();
73
        response = ServletActionContext.getResponse();
73
        referer = request.getHeader("referer");
74
        referer = request.getHeader("referer");
74
        affId = request.getParameter("afid");
75
        affId = request.getParameter("afid");
-
 
76
        utmSrc = request.getParameter("utm_source");
75
        
77
        
76
        createCookiesMap();
78
        createCookiesMap();
77
        updateFirstSourceCookie();
79
        updateFirstSourceCookie();
78
        updateSessionSourceCookie();
80
        updateSessionSourceCookie();
79
 
81
 
Line 221... Line 223...
221
	}
223
	}
222
    
224
    
223
    private String getSource() {
225
    private String getSource() {
224
        String src = "";
226
        String src = "";
225
        
227
        
-
 
228
        /* 
-
 
229
         * we are using http://email/ so that it is parsed properly in 
-
 
230
         * DailyProductwithSourceAggregatorServlet.getSource()
-
 
231
         */
-
 
232
        if (utmSrc != null) {
-
 
233
            src = "NEWSLETTER : (http://email/)";
-
 
234
        }
226
        if (referer == null || referer.isEmpty()) {
235
        else if (referer == null || referer.isEmpty()) {
227
            String queryString = request.getQueryString();
236
            String queryString = request.getQueryString();
228
            queryString = queryString == null? "" : "?" + queryString;
237
            queryString = queryString == null? "" : "?" + queryString;
229
            src = "DIRECT : " + "(" + request.getRequestURL() + "/" + queryString + ")";
238
            src = "DIRECT : " + "(" + request.getRequestURL() + "/" + queryString + ")";
230
        } 
239
        } 
231
        else if (referer.startsWith("http://www.saholic.com") || referer.startsWith("http://www.shop2020.in")) {
240
        else if (referer.startsWith("http://www.saholic.com") || referer.startsWith("http://www.shop2020.in")) {