Useful scripts for Google Tag Manager

Sessions and Hit Scoped Dimensions

Do not mix sessions and hit scope dimensions.

The behavior is rather counter-intuitive.


Let’s take the following user journey examples:

User 1:    Homepage -> Product page -> Product Page

User 2:   Product page

User 3:  Homepage -> product page


Now you might expect to have 3 sessions for “product page” because all 3 users navigated on that page during their sessions.

But you would be wrong:  the “sessions” metric is only incremented for the first hit in the session. Here is a table so you can make sense of it:

Page Sessions
Homepage 2
Product page 1


User Page Sessions
User 1 Homepage 1
User 1 Product page 0
User 1 Product page 0
User 2 Product page 1
User 3 Homepage 1
User 3 product page 0


This also affects how bounce rate and exit rate is calculated, because these are compound metrics that are calculated with “sessions”.

Events, although are hit-based, do not share the same behavior. The sessions are always incremented no matter the position in the user journey.

So, if you create a custom dimension in order to content-group your pages be careful how you report the data collected.

Next Post

Previous Post

Leave a Reply

© 2020 GTMScripts