edit-task
Home
Up
Delete
Task Name:
Task Description:
OVERVIEW - create an enhanced log of per user / session activity on site to determine which pages users are visiting, the page path and ...
TaskGroup ID:
Start Date:
Start Time:
Duration:
Priority:
Status:
To Do
Completed
In Process
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">FEATURE - user analytics</h1> <h2>[WHAT]</h2> <ol> <li><strong>] new admin feature to report which CD pages our users are viewing</strong></li> <ol> <li> ENHANCEMENT to the web server log data which does not provide qstring or pages by user, so while we do know that PG 'view/articles' OR PG view/article was viewed (x) times in a given <span style="text-decoration: underline;">period</span> but we do not know which articles(in qstring) nor do we know which which user viewed it, what we want to know is which user viewed which pages, </li> </ol></ol> <h2>[WHY]</h2> <ol> <li>] associate each unique visitor (by ip) with user session(s)</li> <ol> <li>] referrer = where did visitor arrive from</li> </ol> <li>] pages </li> <ol> <li>] which page or pages did user (x) visit on our site </li> </ol> <li>] properties</li> <ol> <li>] user.register ed</li> <li>] user guest</li> <li>?] session id</li> <li>] page count = #</li> <li>] page path = string [], ex ["index", "view/libraries", "view/Books?id=#", ...]</li> <li>] page.ref = url</li> <li>] session start time </li> <li>] session exit time</li> </ol> <li>]</li> </ol> <h2>[WHERE]</h2> <ol> <li>] access from 'site admin' page </li> </ol> <h2>[WHEN]</h2> <ol> <li>] August 2013</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li>] Report By Period(day, week, month, qtr, year)</li> <ol> <li>each user (ip or name)</li> <ol> <li>VISIT date, pages(count), time st, ttl, pages[]</li> </ol></ol></ol> <h2>[HOW-TO]</h2> <ol> <li>] db owner</li> <ol> <li>] id</li> <li>] dbName</li> <li>] sName</li> <li>] ownerUserId</li> </ol> <li>] sospeps</li> <ol> <li>] id</li> <li>] uId</li> <li>] dbId</li> <li>] role</li> </ol> <li>] user-profile</li> <ol> <li>] em</li> <li>] id</li> <li>] sName</li> <li>] sDesc</li> </ol> <li>] membership</li> <ol> <li>]</li> </ol> <li>] roles</li> <ol> <li>]</li> </ol> <li>] membersInRole</li> <ol> <li>]</li> </ol> <li>] IeNumerable<sospep>sospeps{</li> <ol> <li>return getSospeps }</li> </ol></ol> <h2>[REFERENCE]</h2> <ol> <li>] PageStart -v-001 - ] working </li> <li>] PageStart -v-002 - ] CUT greenspace ] REM is authenticated block to set 'current'</li> <li><span style="text-decoration: line-through;">] siteLayout - just used TESTING, for writing valuees to page</span></li> <li>] ana - report analytics records</li> <li>] ana1 - report analytics records</li> <li>] User.cs - </li> <li>] PageStart -v-00#</li> </ol> <div> </div> <hr /> <h1 style="text-align: center;">developer implementation</h1> <h2>[process]</h2> <ol> <li><strong> ] PG pageStart</strong></li> <ol> <li><strong>i] if (cookie) - read cookie values for .... </strong></li> <ol> <li>] count</li> <li>] page = page url + qstring</li> <li>] ip </li> <li>] referred</li> </ol> <li><strong>i] else no cookie</strong></li> <ol> <li>] initialize Page variables for each property</li> </ol> <li><strong>] adjust for this. page</strong></li> <ol> <li>x] increase page count</li> <li>x] ADD current page to pages list </li> </ol> <li><strong>x] PG PageStart save cookie </strong></li> <ol> <li>*] as user traverses site, cookie is read, adjusted on each page (count++, ), saved, then loaded on next page </li> </ol></ol> <li><strong>i] Global asax - on session timeout</strong></li> <ol> <li>] save cookie info to db PRB cant read Request.Cookies at this point</li> <li>*] info = pages, pgCount, ip, referrer, +datetimeSessionStart, SessionEnd, duration </li> </ol> <li><strong>] PAGES - x] /view/, x] /add/, x] /edit/, x] delete </strong></li> <ol> <li>x] libraries, books, chapters, articles, article REMOVE - SET sesion var =, use Page.user which is set in the PageStart </li> <li>x] warehouses, ...</li> <li>x] ...</li> </ol> <li><strong>] READ - data</strong></li> <ol> <li>] how many sessions, period(day), list by ip</li> <li>] each session</li> </ol></ol> <h2>[notes]</h2> <ol> <li><strong>STRATEGY-1 </strong></li> <ol> <li>] write each page visit to cookie</li> <li>] on pageStart read cookie, add page info, update cookie</li> <li>] on session end(using global.asax), write cookie to db record</li> <ol> <li>PRB on session end event, cookie is gone</li> </ol></ol> <li><strong>STRATEGY-2</strong></li> <ol> <li>] on each page, get page visit info </li> <li>] post pageVisit info to NEW user properties, </li> <li>] post pageVisit info to NEW db table </li> </ol> <li><strong>GLOBAL.ASAX</strong></li> <ol> <li>write 'event handler' code the can hook into 'application lifecycle' events like 'init', session_Start, Session_End</li> <li>using Import namespace statement to ....</li> </ol> <li><strong>HTTP MODULES - for every request</strong></li> <ol> <li>WHAT = assembly that is CALLED on EVERY REQUEST to your app, </li> <li>WHY = for logging, security, </li> <li>] examine incoming requests, an HTTP module can perform custom authentication or other security checks before the requested page, </li> <li>] Can subscribe to application lifecycle events (init, app start, app end, session start , session end)</li> </ol> <li><strong>HTTP HANDLERS</strong> for every request with file extension(.xyz) </li> <ol> <li>WHAT = ( process (endpoint) that executes in response to a request for a particular file type), default for web application is .aspx, also have asmx for ___ and </li> <li>WHY USE = .rss feed, image server - serve different size images for PGs based upon{screen size}, </li> </ol> <li>// ERROR Task is a type, not a namespace </li> <li>Import Task // ERROR task is a Type that is used like a namespace</li> <li>% @Import Namespace="global"% //does not exist</li> <li>Import sospepApp.Task // ERROR Task does not exist from files using task</li> <ol> <li>- likely need to add a @using sospepApp.Task to each page with a Task object</li> </ol> <li>WORKS % @Import Namespace="WebMatrix.Data"% </li> <li>] ive got a web pages app and am trying to add a lightweight user tracking module.</li> <li>for each session i want to track the pages the user visits i would prefer not to hit the db on each page and just store the users trail in a cookie and then when the session ends, get the info from the tracking cookie and post it into the db. the PROBLEM i have is ...</li> <li>> have a webpages app and i am trying to hook into the hook into the global.asax Session_End event </li> <li>> The Session_End event is firing but "my code" is not executing. </li> <li> public const string qryTaskAdd="INSERT INTO tasks (name_task, description_task, parent_id, start_time, duration, photo, content_task, content_format,status,priority, owner) " + "VALUES </li> <li>(@0,@1,@2,@3,@4,@5,@6,@7,@8,@9,@10)"; </li> </ol> <p> </p> <hr /> <p> </p> <h1 style="text-align: center;">status</h1> <p> </p> <h2>[previously]</h2> <ol> <li><strong>x] [2013-08-11]</strong></li> <ol> <li>x] PageStart - v-001 - original version with ....</li> <li>x] PageStart - v-002 ] cleanup ] add code to get from user ( ] "ip", ] referred, ] ... )</li> <li>x] DOC - feature - user analytics </li> <li>x] PG SiteLayout - used for TESTing, output variables </li> <li>i] PGs - veiw/{L1} libraries - remove SET user code, replaced with Page.user</li> </ol> <li><strong>x] [2013-08-13] - PAGEs/</strong></li> <ol> <li>x] PG view/{L1} - remove SET Session user from page, replaced with Page User, remove file extension from links, </li> <li>x] PG view/{L2} - remove SET Session user from page, replaced with Page User, remove file extension from links, </li> <li>x] PG view/{L2} - remove SET Session user from page, replaced with Page User, remove file extension from links,</li> <li>x] PG view/{L3} - remove SET Session user from page, replaced with Page User, remove file extension from links, </li> <li>x] PG view/{L4} - remove SET Session user from page, replaced with Page User(2*), remove file extension from link,</li> <li>x] PG view/{L5} - remove SET Session user from page, replaced with Page User(2**), remove file extension from link,</li> <li><strong>x] PG add/{subjects, objects,...} </strong></li> <ol> <li>] remove SET session user, use page for permission</li> </ol> <li><strong>x] edit/{subjects, objects, ...}</strong></li> <ol> <li>] </li> </ol> <li><strong>x] TEST get sessionTimeout value</strong></li> <ol> <li>x] this works, but only returns the value specified in the SessionTimeout property, NOT the time remaining in the session</li> </ol></ol> <li><strong>i] [2013-08-15] PG global_asax</strong></li> <ol> <li>x] read cookie</li> <li>x] insert db record</li> <li>x] import namespace (WebMatrix.Data to use db)</li> <li><span style="background-color: #ffff99;">] PRB using sospep Task class b/c of no namespace ? IF create namespace then have to add a @using namespace to each page with Task object</span></li> <li>i] WA insert db qry</li> <li>*] TEST application lock - all code needs to be inside here?</li> <li>] PRB cant read cookie values in the Session_End event ( b/c Request ojbject is eol ) </li> <li>] OVU page overide VS scripts </li> <li><strong>i] PG ana</strong></li> <ol> <li>] display records that are inserted into E.templates/all/prj-022 (parent id = 157) BY session end</li> <li>*] PRB with partial records</li> </ol></ol> <li><strong>[2013-08-21]</strong></li> <ol> <li>] PG pageStart -v-002-cookies, replaced with PageStart-v-00# ( using REVISED User object to track visits)</li> <li>] PG pageStart -v-00#</li> <li>] CS User </li> <ol> <li>added properties for ] ip, ] page</li> <li>added method logVisit() which posts user + page info to db</li> </ol> <li>] DB 'public'</li> <ol> <li>added table 'visits', </li> </ol></ol></ol> <h2 style="text-align: left;">[current]</h2> <ol> <li><strong> [2014-04-29] DASHBOARD</strong></li> <ol> <li><strong>QTR-00 -- 0 - customers, 0 - revenue, 0 - growth</strong></li> <ol> <li>customers -</li> <li>revenue - ] qtr, prj-Ann ] </li> <li>growth - ] customers ] users ttl, active ] traffic</li> </ol> <li><strong>QTR-01 -- 12 - customers, 1.2k - revenue, 100% - growth</strong></li> <ol> <li>sample data</li> </ol> <li><strong>QTR-02 -- 36 - customers, 3.6k - revenue, 200% - growth</strong></li> <li>+ expenses</li> </ol></ol> <h2>[next]</h2> <p> </p> <ol> <li>] fire 'cleanup event' when sessionTimeout fires</li> <ol> <li>] </li> </ol></ol>