When looking at visitor stats, we’re used to looking at sums and averages. How many visitors came to the website, how long did they stay on average, what are the conversion rates?
However, these aggregate stats may be misleading if we calculate them over our entire visitor population.
E.g. when measuring conversion rates, we don’t really expect users who have already registered to do it again, so we should take them out of the equation. Same goes for other behaviors – registered users and “guests” come to our website for totally different purposes. We should measure them separately and optimize for different goals per population (retention vs. persuasion).
This is where Custom Variables come in. When a visitor signs up – set a visitor-level custom variable for the user with the value “user-type=registered”. When a user buys something, update to “user-type=buyer”. This requires implementation within the page code. It enables us to optimize user experience separately for each user group.