chobo
chobo

Reputation: 32281

How to setup visitor variables in Google Analytics

I don't quite get how to use the visitor level variables. Do I need to put them in some sort of condition to determine if the visitor is a repeat visitor, or do I just use the _SetCustomVar method like I would the page or session variables?

Upvotes: 1

Views: 294

Answers (1)

Yahel
Yahel

Reputation: 37305

Google Analytics will determine if someone is the same visitor based on the presence of its cookies. So, to the extent that GA is able to differentiate Visitors (ie, same computer, same browser as past visits without having removed cookies), the custom variable will persist.

All you need to do to set a variable as 'visitor' is to set the fourth parameter (scope) to 1.

Just be sure to set the custom variable before your page-view call, otherwise the custom variable data doesn't get sent to Google.

Upvotes: 1

Related Questions