{"id":163,"date":"2023-04-20T20:10:52","date_gmt":"2023-04-20T20:10:52","guid":{"rendered":"https:\/\/hotbrain.co\/?p=163"},"modified":"2023-04-21T22:21:12","modified_gmt":"2023-04-21T22:21:12","slug":"segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible","status":"publish","type":"post","link":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible","title":{"rendered":"Segmenting out internal website traffic: What’s the best way?"},"content":{"rendered":"\n

When you have a large staff and\/or a staff that visits the organization\u2019s website a lot, it can really mess with your website analytics data. It\u2019s easy to imagine 10\u201320+% of your website traffic<\/strong> being irrelevant to your external marketing efforts \/ the audience you want to reach. This in turn nerfs conversion rates, while inflating traffic, engagement \/ time on site, etc! And of course, it also precludes doing internal website usage analysis.<\/p>\n\n\n\n

To make matters more complicated, these days a lot of the time staff just isn\u2019t at the office\/campus, and\/or is using their mobile phone data vs the office wifi\u2014so GA4\u2019s built-in IP address filter<\/a> method is just really not a good solution at all.<\/p>\n\n\n\n

So what can we do?<\/strong><\/h2>\n\n\n\n

We could<\/em> take a fairly passive approach and segment our traffic by those users who visit the administrative area<\/strong> of the organization\u2019s website.<\/p>\n\n\n\n

But this is pretty weak since, for many organizations the people who regularly do this might be limited to a very small number of personnel. However it could be a good fit if all employees are required to log in to the website for HR purposes\u2026<\/p>\n\n\n\n

The other major challenge is that normal segmentation relies on either setting our own, or using Google Analytics\u2019 built-in cookies. We decided that cookies were too fragile, as they tend to get deleted after a year (max), some users delete them periodically manually, or don\u2019t accept them at all. And people just generally have something of an aversion to them nowadays, so minimizing reliance on them is not a bad call.<\/p>\n\n\n\n

In the end, we couldn\u2019t find a solution that was robust enough for us<\/strong>,<\/em> especially since we don\u2019t work at our client\u2019s organizations full-time and don\u2019t want something high maintenance\u2014i.e. where we would have to be updating (potentially) rotating IP addresses for staff (we already looked at why this was suboptimal anyway), replacing cookies, etc. (yes, cookies could be replaced automatically if not present, but again we wanted to try something that wasn\u2019t cookie-based).<\/p>\n\n\n\n

What we ended up doing:<\/strong><\/h2>\n\n\n\n

First, we had our client ask all staff to visit a special, secret URL on the organization\u2019s main website.<\/p>\n\n\n\n

When that URL was visited, we used Google Tag Manager (GTM), along with some special custom javascript, to place a \u201cpermanent\u201d record in the browser\u2019s local storage<\/strong> that indicated that they were \u201cinternal\u201d traffic.<\/p>\n\n\n\n

What\u2019s local storage?<\/strong><\/h2>\n\n\n\n

Basically it\u2019s a more permanent, harder-to-delete place to store persistent data in browsers (it also offers larger storage than wimpy cookies). You can read more about it here<\/a>. It\u2019s also very easy to interact with via javascript!<\/p>\n\n\n\n

You can see local storage in action here:<\/p>\n\n\n\n

\"\"
We use this value to identify the visitor as staff\/internal traffic.<\/figcaption><\/figure>\n\n\n\n

Essentially we created a key of visitor_type<\/code> and the possible values of internal<\/code> or external<\/code>.<\/p>\n\n\n\n

The tag logic works by setting the default value of visitor_type<\/code> to external<\/code>, unless<\/strong> internal<\/code> is set. We then send that info to Google Analytics 4 as a custom dimension. So after visiting the secret page URL, on the next page load, Google Tag Manager will see the new value, and send the data to GA4 accordingly.<\/p>\n\n\n\n

This worked out really well and I thought some people might want to know that this is an option!<\/p>\n\n\n\n

Caveats:<\/strong><\/h2>\n\n\n\n

Since the method requires staff identifying themselves by way of visiting a URL, you need to be sure everyone has done it. This also means they have to visit it on all<\/strong> of their devices\u2014and<\/em> do it again if they get a new device or start using a new browser, or<\/em> wipe their device (this would be true of the cookie method as well). I would recommend baking this into new hire onboarding, and maybe sending out an email every year or two to encourage people to visit the secret URL again just in case they forgot to do it themselves when encountering the reasons above.<\/p>\n","protected":false},"excerpt":{"rendered":"

When you have a large staff and\/or a staff that visits the organization\u2019s website a lot, it can really mess with your website analytics data. It\u2019s easy to imagine 10\u201320+% of your website traffic being irrelevant to your external marketing efforts \/ the audience you want to reach. This in turn nerfs conversion rates, while […]<\/p>\n","protected":false},"author":2,"featured_media":185,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[4],"yoast_head":"\nSegmenting out internal website traffic: What's the best way? - hotbrain.co<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Segmenting out internal website traffic: What's the best way? - hotbrain.co\" \/>\n<meta property=\"og:description\" content=\"When you have a large staff and\/or a staff that visits the organization\u2019s website a lot, it can really mess with your website analytics data. It\u2019s easy to imagine 10\u201320+% of your website traffic being irrelevant to your external marketing efforts \/ the audience you want to reach. This in turn nerfs conversion rates, while […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible\" \/>\n<meta property=\"og:site_name\" content=\"hotbrain.co\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hotbrainco\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-20T20:10:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-21T22:21:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2430\" \/>\n\t<meta property=\"og:image:height\" content=\"1128\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Drew Clifton\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hotbrainco\" \/>\n<meta name=\"twitter:site\" content=\"@hotbrainco\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Drew Clifton\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#article\",\"isPartOf\":{\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible\"},\"author\":{\"name\":\"Drew Clifton\",\"@id\":\"https:\/\/hotbrain.co\/#\/schema\/person\/97bb895d79756fe946f6b674dd3461ba\"},\"headline\":\"Segmenting out internal website traffic: What’s the best way?\",\"datePublished\":\"2023-04-20T20:10:52+00:00\",\"dateModified\":\"2023-04-21T22:21:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible\"},\"wordCount\":676,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/hotbrain.co\/#organization\"},\"image\":{\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png\",\"keywords\":[\"analytics\"],\"articleSection\":[\"blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible\",\"url\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible\",\"name\":\"Segmenting out internal website traffic: What's the best way? - hotbrain.co\",\"isPartOf\":{\"@id\":\"https:\/\/hotbrain.co\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png\",\"datePublished\":\"2023-04-20T20:10:52+00:00\",\"dateModified\":\"2023-04-21T22:21:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#primaryimage\",\"url\":\"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png\",\"contentUrl\":\"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png\",\"width\":2430,\"height\":1128},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hotbrain.co\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Segmenting out internal website traffic: What’s the best way?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hotbrain.co\/#website\",\"url\":\"https:\/\/hotbrain.co\/\",\"name\":\"hotbrain.co\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/hotbrain.co\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hotbrain.co\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/hotbrain.co\/#organization\",\"name\":\"Hotbrain\",\"url\":\"https:\/\/hotbrain.co\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hotbrain.co\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/hotbrain-logo-white-nbg-2000w.png\",\"contentUrl\":\"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/hotbrain-logo-white-nbg-2000w.png\",\"width\":2000,\"height\":460,\"caption\":\"Hotbrain\"},\"image\":{\"@id\":\"https:\/\/hotbrain.co\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/hotbrainco\/\",\"https:\/\/twitter.com\/hotbrainco\",\"https:\/\/www.linkedin.com\/company\/hotbrain\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/hotbrain.co\/#\/schema\/person\/97bb895d79756fe946f6b674dd3461ba\",\"name\":\"Drew Clifton\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hotbrain.co\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2ab73d9efa7bb4d07e4a98b8cb768cf1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2ab73d9efa7bb4d07e4a98b8cb768cf1?s=96&d=mm&r=g\",\"caption\":\"Drew Clifton\"},\"description\":\"Drew is the Founder and Program Director at Hotbrain, where he shares his unique industry experience with the team and clients, and helps steer Hotbrain's ethos, approach and content.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Segmenting out internal website traffic: What's the best way? - hotbrain.co","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible","og_locale":"en_US","og_type":"article","og_title":"Segmenting out internal website traffic: What's the best way? - hotbrain.co","og_description":"When you have a large staff and\/or a staff that visits the organization\u2019s website a lot, it can really mess with your website analytics data. It\u2019s easy to imagine 10\u201320+% of your website traffic being irrelevant to your external marketing efforts \/ the audience you want to reach. This in turn nerfs conversion rates, while […]","og_url":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible","og_site_name":"hotbrain.co","article_publisher":"https:\/\/www.facebook.com\/hotbrainco\/","article_published_time":"2023-04-20T20:10:52+00:00","article_modified_time":"2023-04-21T22:21:12+00:00","og_image":[{"width":2430,"height":1128,"url":"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png","type":"image\/png"}],"author":"Drew Clifton","twitter_card":"summary_large_image","twitter_creator":"@hotbrainco","twitter_site":"@hotbrainco","twitter_misc":{"Written by":"Drew Clifton","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#article","isPartOf":{"@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible"},"author":{"name":"Drew Clifton","@id":"https:\/\/hotbrain.co\/#\/schema\/person\/97bb895d79756fe946f6b674dd3461ba"},"headline":"Segmenting out internal website traffic: What’s the best way?","datePublished":"2023-04-20T20:10:52+00:00","dateModified":"2023-04-21T22:21:12+00:00","mainEntityOfPage":{"@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible"},"wordCount":676,"commentCount":0,"publisher":{"@id":"https:\/\/hotbrain.co\/#organization"},"image":{"@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#primaryimage"},"thumbnailUrl":"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png","keywords":["analytics"],"articleSection":["blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible","url":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible","name":"Segmenting out internal website traffic: What's the best way? - hotbrain.co","isPartOf":{"@id":"https:\/\/hotbrain.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#primaryimage"},"image":{"@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#primaryimage"},"thumbnailUrl":"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png","datePublished":"2023-04-20T20:10:52+00:00","dateModified":"2023-04-21T22:21:12+00:00","breadcrumb":{"@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#primaryimage","url":"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png","contentUrl":"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/ga4-segment-internal-traffic-fix.png","width":2430,"height":1128},{"@type":"BreadcrumbList","@id":"https:\/\/hotbrain.co\/segmenting-out-internal-website-traffic-the-most-robust-while-still-practical-way-possible#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hotbrain.co\/"},{"@type":"ListItem","position":2,"name":"Segmenting out internal website traffic: What’s the best way?"}]},{"@type":"WebSite","@id":"https:\/\/hotbrain.co\/#website","url":"https:\/\/hotbrain.co\/","name":"hotbrain.co","description":"","publisher":{"@id":"https:\/\/hotbrain.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hotbrain.co\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hotbrain.co\/#organization","name":"Hotbrain","url":"https:\/\/hotbrain.co\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hotbrain.co\/#\/schema\/logo\/image\/","url":"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/hotbrain-logo-white-nbg-2000w.png","contentUrl":"https:\/\/hotbrain.co\/wp-content\/uploads\/2023\/04\/hotbrain-logo-white-nbg-2000w.png","width":2000,"height":460,"caption":"Hotbrain"},"image":{"@id":"https:\/\/hotbrain.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hotbrainco\/","https:\/\/twitter.com\/hotbrainco","https:\/\/www.linkedin.com\/company\/hotbrain\/"]},{"@type":"Person","@id":"https:\/\/hotbrain.co\/#\/schema\/person\/97bb895d79756fe946f6b674dd3461ba","name":"Drew Clifton","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hotbrain.co\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2ab73d9efa7bb4d07e4a98b8cb768cf1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2ab73d9efa7bb4d07e4a98b8cb768cf1?s=96&d=mm&r=g","caption":"Drew Clifton"},"description":"Drew is the Founder and Program Director at Hotbrain, where he shares his unique industry experience with the team and clients, and helps steer Hotbrain's ethos, approach and content."}]}},"_links":{"self":[{"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/posts\/163"}],"collection":[{"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":7,"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":361,"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/posts\/163\/revisions\/361"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/media\/185"}],"wp:attachment":[{"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hotbrain.co\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}