getVisitStart SiteCatalyst Plug-in

The getVisitStart plug-in is used to determine first page of a visit. It returns 1 on the first plug-in call of the visit, otherwise returns nothing. It uses a 30 minute cookie if possible, otherwise reverts to a session cookie. It always returns 0 if 30 minute or session cookie can’t be set.

Plug-in Prototype

Parameter Descriptions
c=cookie name for tracking (“s_visit” is standard)

Here is an example use of the plug-in to populate a s.prop variable with a value on the first page of the visit.


This would return 1 on the first page of the visit, nothing all the remaining pages.

Let’s say on the first page view of a visit you want to set an event and capture the URL in a prop. You could use this plug-in like this to accomplish that.

if (s.visEvent) {,'event1',',',1); 


 * Get visit start
s.getVisitStart=new Function("c",""
+"var s=this,v=1,t=new Date;t.setTime(t.getTime()+1800000);if(s.c_r(c"
+")){v=0}if(!s.c_w(c,1,t)){s.c_w(c,1,0)}if(!s.c_r(c)){v=0}return v;");