Opening my email inbox this morning, I find the following message from the Google Analytics team:
As an Administrative user on an account that is currently using custom visitor segments in Google Analytics, we would like to inform you of some changes to the _setVar method and its impact on bounce rate and time on page metrics. Starting Wednesday, January 27, 2009 a call to the _setVar method will no longer be counted as an interaction hit with the result that you may see higher bounce rates and more accurate time on page metrics in your reports.
“Interaction hit”, higher bounce rate and better accuracy of time on page? What is this gibberish? This is the perfect opportunity to demystify Google Analytics' least well-defined metric.
WHAT IS A CUSTOM VARIABLE AND HOW DOES IT WORK?
The personalized variables (User Defined Variables) make it possible to define segments of visitors, according to different criteria. It is up to the site owner to establish what conditions should define a segment on their site. In summary, we attach an identifier to a visitor, a segment, following an action that the latter performs on our site:
- After visiting a specific section of the site
- After completing a contact request form
- Once you become a member of the site
- After purchasing an item on the site
To attach a segment to a visitor, we use the _setVar function . For example, to identify customers on a transactional site, all you have to do is call this function on the transaction confirmation page. Here is what this code could look like, to create a customer segment , on the page after login :
IMPORTANT: this code must be placed after the Google Analytics tracking code. With this code in place, a visitor who completes a transaction on the site will now be classified as a customer . Other visitors will be identified by the very generic “(not set)” segment. The segments thus created are accessible via the “Visitors > Custom values” report:

These segments can also be used via the “Fields of application” drop-down menu, under “Custom value”. For example, to view custom segments for a given campaign:

A DOUBLE-EDGED WEAPON
Without considering the limitations and specific behavior of custom variables, the results may appear meaningless and chaotic. By understanding how these variables work, we manage to tame them. The custom variable is not designed to change during a single visit The first segment created during a visit is applied to the entire visit, for metrics calculated per session, i.e.:
- visits
- time spent on site
- rebound rate
- conversion goals
- ecommerce
The classic mistake is to create a “visitor” segment for visitors who land on the site and apply a new “customer” segment after the visitor completes a transaction. Such an approach would result in transactions for the “visitor” segment, since this segment is the first defined, and it is applied to the entire visit.
If the value of the segment changes during the visit, the last segment will be applied to the next visit Let's go back to the example of the “visitor” and “customer” segments. In this context, the "customer" segment will only be applied during the user's next visit. A segment is applied to an entire visit only if no other segment is already defined.
For page views, it's different! Pageviews are not data that is calculated per session. For this reason, the behavior of the session variable differs from what we have just described. Let's take the example of the “visitor” and “customer” segments again. Pages viewed before the definition of the “customer” segment will be assigned to the “visitor” segment. The other page views will be attached to the “customer” segment. What to sow confusion!
AND THE BOUNCE RATE? TIME SPENT ON A PAGE?
Bounce rate and time spent on a page are two metrics calculated from what Google Analytics defines as “interaction hits”. These interactions represent the different types of interaction measured by Google Analytics: a page view, an event, a transaction and formerly, the personalized variable. To measure the time spent on a page, Google Analytics records the time that elapses between two "interaction hits" for a given page.
Formerly, the definition of a personalized variable therefore changed this calculation strangely. The same goes for the bounce rate. By definition (at least according to Google Analytics), a bounce is a visit where only one interaction is counted. Again, using custom variables on a site rendered this data completely unusable.
In my opinion, and it seems to be the opinion of most practitioners, this change is good news: a step closer to a more faithful representation of data in Google Analytics. As a result, for sites that use custom variables, expect an increase in bounce rate and a change in average time per page in the coming days .
Expertises évoquées
(SizeLimitingPyList: [Tech, Analytics & Tracking])(SizeLimitingPyList: [Tech, Analytics & Tracking])
You May Also Like
These Related Stories

The Google Analytics API: free your data
The reports offered in the Google Analytics interface satisfy the vast majority of its users. And for good reason, they answer most of the questions you may have about the performance of content, campaigns and user behavior. Google Analytics also allows the creation of dashboards to have an even more refined and personalized view of its data.

Get the exact keyword for Adwords – Review of approaches in Google Analytics
Google Analytics immediately offers tight integration with Adwords, which raises the possibilities of analyzing this source of traffic to a whole new level. It is therefore possible to cross-reference Adwords keywords with the wealth of data available in Google Analytics. However, what about the keyword searched by the visitor before clicking on the ad? What was the original research intent ? And ultimately, why do some Adwords keywords convert so badly on my site?

How to ensure a successful transition toward Google Analytics 4?
The world of Google Analytics is about to enter a new era. The free version you’re currently using is on the edge of being replaced by Google Analytics 4 (GA4), formerly known as App+Web. It’s important to grasp the magnitude of this shift, because it’s the biggest transformation ever made to the platform. Rest assured: for the time being, the move to GA4 is strongly recommended, but not required. But once you make the shift, there’s no going back. As a result, marketing and e-commerce teams that rely on data from Google Analytics on a daily basis to measure their business performance need to be sure they have a sound transition plan in place before flipping the switch. For users of the paid 360 version, know that a paid version of GA4 is also coming – though details on this version won’t be forthcoming before 2021. For everyone else, in other words the vast majority of Google Analytics users, you’ll want to start preparing for the adoption of a new measurement paradigm immediately. A …
Repérer et valoriser ce qui compte vraiment.
Recevez nos analyses et conseils pour rester à l’avant-garde du numérique.