Perguntas que você deve se fazer quando trabalha com o Google Analytics (GA):
- Quanto tempo tem a sessão antes de expirar?
- Qual é a duração do cookie de campanha?
Seguem as respotas e os parâmetros que podem ser alterados, livremente:
_setSessionTimeout()
_setSessionTimeout(newTimeout)
- Sets the new session timeout in seconds. By default, session timeout is set to 30 minutes (1800 seconds). Session timeout is used to compute visits, since a visit ends after 30 minutes of browser inactivity or upon browser exit. If you want to change the definition of a "session" for your particular needs, you can pass in the number of seconds to define a new value. This will impact the Visits reports in every section where the number of visits are calculated, and where visits are used in computing other values. For example, the number of visits will increase if you shorten the session timeout, and will decrease if you increase the session timeout.
parameters
String newTimeout
New session timeout to set in seconds. _setCookieTimeout()
_setCookieTimeout(newDefaultTimeout)
- Sets the campaign tracking cookie expiration time in seconds. By default, campaign tracking is set for 6 months. In this way, you can determine over a 6-month period whether visitors to your site convert based on a specific campaign. However, your business might have a longer or shorter campaign time-frame, so you can use this method to adjust the campaign tracking for that purpose.
pageTracker._setCookieTimeout("3152600"); //number of seconds in 1 year
parameters
String newDefaultTimeout
New default cookie expiration time to set. Pass in as a string and it is converted to an integer. Fonte
Um comentário:
legal
Postar um comentário