<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Google Tag Manager Archives - Reflective Data</title>
	<atom:link href="https://reflectivedata.com/category/google-tag-manager/feed/" rel="self" type="application/rss+xml" />
	<link>https://reflectivedata.com/category/google-tag-manager/</link>
	<description></description>
	<lastBuildDate>Mon, 22 May 2023 13:34:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://reflectivedata.com/wp-content/themes/reflective-data/img/icon-512.png</url>
	<title>Google Tag Manager Archives - Reflective Data</title>
	<link>https://reflectivedata.com/category/google-tag-manager/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Data You Should Be Tracking Using Google Analytics Custom Events</title>
		<link>https://reflectivedata.com/data-you-should-be-tracking-using-google-analytics-custom-events/</link>
					<comments>https://reflectivedata.com/data-you-should-be-tracking-using-google-analytics-custom-events/#comments</comments>
		
		<dc:creator><![CDATA[Silver Ringvee]]></dc:creator>
		<pubDate>Thu, 26 Sep 2019 09:59:41 +0000</pubDate>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Google Optimize]]></category>
		<category><![CDATA[Google Tag Manager]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Tools]]></category>
		<guid isPermaLink="false">http://reflectivedata.com/?p=3487</guid>

					<description><![CDATA[<p>Out of the box, Google Analytics already tracks a bunch of really useful data points. What the default setup lacks, though, is context and events that are specific to your website and business.</p>
<p>Custom Events provide a perfect solution for adding context and tracking more specific user actions. In this article, we are giving you a good amount of ideas for custom events you should implement on your own and/or your clients' websites.</p>
<p>The post <a href="https://reflectivedata.com/data-you-should-be-tracking-using-google-analytics-custom-events/">Data You Should Be Tracking Using Google Analytics Custom Events</a> appeared first on <a href="https://reflectivedata.com">Reflective Data</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Out of the box, Google Analytics already tracks a bunch of really useful data points. What the default setup lacks, though, is context and events that are specific to your website and business.</p>
<p>Custom Events provide a perfect solution for adding context and tracking more specific user actions. In this article, we are giving you a good amount of ideas for custom events you should implement on your own and/or your clients&#8217; websites.</p>
<p>This post is divided into sections by different event categories so you could skip the ones that are not relevant for you.</p>
<h2>Clicks</h2>
<p>For almost all websites, the most common user interaction is a click. By default, Google Analytics isn&#8217;t very good at tracking them. Let&#8217;s see how we could improve this situation.</p>
<h4>Navigation clicks</h4>
<p>Tracking usage of the main menu, sidebar and other navigation elements is critical. This is how your visitors explore your business and move in the funnel.</p>
<p>Detecting navigation interactions is <a href="https://dcarlbom.com/google-tag-manager/track-main-menu-usage-site-gtm/" target="_blank" rel="noopener noreferrer">easy with Google Tag Manager</a> and sending data to Google Analytics works as with any other event.</p>
<p>Since there may be several navigation elements containing links to the same page, it is important to also pass the information about which navigation was used. For example, you might a have link to your blog both in the header and in the footer.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: click
action: top-navigation, sidebar etc.
label: link text
non-interaction: false</pre>
<h4>CTA clicks</h4>
<p>Tracking clicks on all of your CTAs (call to actions) is extremely important if you have more than one CTA on a single page pointing to the same location (i.e. long-form sales pages).</p>
<p>Don&#8217;t forget that buttons like &#8220;Get a Quote&#8221;, &#8220;Add to Cart&#8221; and &#8220;Checkout&#8221; are also CTAs.</p>
<p>Setup is the same as with <a href="https://www.lovesdata.com/blog/google-tag-manager-button-click-tracking" target="_blank" rel="noopener noreferrer">generic click tracking using GTM</a>.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: click
action: CTA
label: text (and index the same CTA appears multiple times)
non-interaction: false</pre>
<h4>Outbound link clicks</h4>
<p>Also known as tracking website exits, this custom event tells you exactly to which external pages people navigate from your site.</p>
<p>Again, <a href="https://netvantagemarketing.com/blog/tracking-website-exits-using-google-tag-manager/" target="_blank" rel="noopener noreferrer">setting this up</a> is quite easy with GTM.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: click
action: outbound link
label: link URL - link text
non-interaction: false</pre>
<h4>File download clicks</h4>
<p>Doesn&#8217;t matter if you provide whitepapers, ebooks, PDFs, or other types of downloadable files, you should be tracking how often they get downloaded.</p>
<p>There are some <a href="https://www.jeffalytics.com/track-downloads-google-analytics/">really good tutorials</a> online but we recommend setting it up using Google Tag Manager. A simple &#8220;just links&#8221; click trigger with a regex that matches desired filetypes should work just fine.</p>
<p>Regex Example:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">\.(pdf|docx)$</pre>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: click
action: download
label: filename / link text
non-interaction: false</pre>
<h4>Rage clicks</h4>
<p>Visitors rage clicking on certain elements on your website is a good indicator of a UX error. For example, people may click on a blue text that is not a link or on an image that has no click functionality.</p>
<p>We have a <a href="https://reflectivedata.com/tracking-rage-clicks-using-google-tag-manager-and-google-analytics/" target="_blank" rel="noopener noreferrer">separate blog post</a> about tracking rage clicks using Google Tag Manager and Google Analytics.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: click
action: rage click
label: element selector
non-interaction: false</pre>
<h4>Button clicks</h4>
<p>Your website is likely to have all sorts of clickable buttons. There might be some other ways for you to get an overview of the usage of the features related to those buttons but knowing how many clicks each button received definitely helps.</p>
<p>Some ideas for which buttons should be tracked:</p>
<ul>
<li>Add to wishlist/favorites</li>
<li>Add/remove item from cart</li>
<li>Update cart</li>
<li>Continue shopping</li>
<li>Log in/out</li>
<li>Register</li>
<li>etc.</li>
</ul>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: click
action: button
label: button text/description
non-interaction: false</pre>
<h2>Form Interactions</h2>
<p>When it comes to tracking forms, I would like to recommend a few good articles by Simo Ahava that cover everything you need for getting started.</p>
<ul>
<li><a href="https://www.simoahava.com/analytics/track-form-engagement-with-google-tag-manager/" target="_blank" rel="noopener noreferrer">Track Form Engagement With Google Tag Manager</a></li>
<li><a href="https://www.simoahava.com/analytics/track-form-abandonment-with-google-tag-manager/" target="_blank" rel="noopener noreferrer">Track Form Abandonment With Google Tag Manager</a></li>
<li><a href="https://www.simoahava.com/analytics/form-field-timing-with-google-tag-manager/" target="_blank" rel="noopener noreferrer">Form Field Timing With Google Tag Manager</a></li>
</ul>
<p>Since forms are the most important part of many websites (i.e checkout, lead form etc.) you should really nail tracking them correctly.</p>
<h2>A/B Testing</h2>
<h4>Experiment and Variation</h4>
<p>Most A/B testing tools provide some sort of integration with Google Analytics. Most of them, though, are using custom dimensions. A problem with custom dimension based integration is that you need to make sure that the dimensions aren&#8217;t overlapping between experiments because otherwise, you might end up overwriting the dimension value for some experiments.</p>
<p>What we recommend having, besides the default integration, is a secondary event-based integration. That is, sending a custom event for every running experiment in a following format:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: ab testing
action: experiment ID
label: variation number
non-interaction: true</pre>
<p>PS! One event per experiment-variation combination.</p>
<p>This gives you raw information about each experiment and variation that the visitor saw. You can easily use this information in your custom segments or reports.</p>
<p>Every testing has a bit different solution for exposing experiment data to the front-end but here are a few links that should be helpful.</p>
<ul>
<li><a href="https://help.vwo.com/hc/en-us/articles/360021117934-How-to-Integrate-VWO-with-UA-via-Google-Tag-Manager-Custom-Dimensions-" target="_blank" rel="noopener noreferrer">VWO</a> &#8211; instead of custom dimension, send this data using custom event action and label.</li>
<li><a href="https://support.google.com/optimize/answer/9059383?hl=en" target="_blank" rel="noopener noreferrer">Google Optimize</a> &#8211; this allows you to get experiment data to the datalayer, now send it using a custom event.</li>
<li><a href="https://developers.optimizely.com/x/solutions/javascript/reference/index.html#reading-data" target="_blank" rel="noopener noreferrer">Optimizely X</a> &#8211; access data about live experiments using Javascript.</li>
</ul>
<h4>Google Optimize Anti-Flicker Snippet timeout</h4>
<p>If you have any experience with JavaScript-based A/B testing and/or personalization tools you know that flicker can be a real headache.</p>
<p>In case your tool of choice is Google Optimize, you should be using their official anti-flicker snippet to minimize the flicker effect.</p>
<p>We wrote a full separate article on <a href="https://reflectivedata.com/tracking-optimize-anti-flicker-snippet-timeout-in-google-analytics/" target="_blank" rel="noopener noreferrer">Tracking Optimize Anti-Flicker Snippet Timeout in Google Analytics</a>.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: optimize
action: snippet timeout
label: true/false
non-interaction: true</pre>
<h2>Scroll depth</h2>
<p>Whether you are working with a blog, some landing pages or any other page that is longer than a fold, you want to know how far down do the visitors scroll.</p>
<p>It used to required some custom Javascript but now, tracking scroll depth is a <a href="https://www.lovesdata.com/blog/tracking-scroll-depth" target="_blank" rel="noopener noreferrer">built-in feature of Google Tag Manager</a>.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: scroll
action: scroll depth threshold
non-interaction: false</pre>
<h2>Social interactions</h2>
<p>While Google Analytics has a <a href="https://www.optimizesmart.com/guide-to-social-interactions-tracking-in-google-analytics/" target="_blank" rel="noopener noreferrer">dedicated feature for tracking social interactions</a>, having this data in custom events gives you more flexibility in reporting.</p>
<p>There is a really thorough blog post about <a href="https://www.analyticsmania.com/post/track-social-interactions-with-google-tag-manager/" target="_blank" rel="noopener noreferrer">tracking social interactions using Google Tag Manager</a> &#8211; although, if you want something simpler, tracking clicks on your social icons is a good starting point.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: social
action: share/like/follow
label: social platform
non-interaction: false</pre>
<h2>Video events</h2>
<p>Doesn&#8217;t matter if it&#8217;s a sales video, a video that explains how your product works or a tutorial &#8211; you do care about how many people start the video and how far through will they make.</p>
<p>Google Tag Manager provides a really easy solution for <a href="https://www.getelevar.com/how-to/implement-video-tracking-with-google-tag-manager/" target="_blank" rel="noopener noreferrer">tracking YouTube videos</a> but tracking others such as <a href="https://www.cardinalpath.com/vimeo-tracking-with-google-tag-manager/" target="_blank" rel="noopener noreferrer">Vimeo</a> is completely doable as well.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: videos
action: start/pause/percentage
label: video id
non-interaction: false</pre>
<h2>Errors</h2>
<p>No matter how good your site is, there will always be errors. Since errors are directly related to bad user experience, tracking them is absolutely crucial.</p>
<p>The first step here should be sending your <a href="https://www.tatvic.com/blog/javascript-error-tracking-google-analytics-via-google-tag-manager-unsung-hero-2/" target="_blank" rel="noopener noreferrer">Javascript errors to Google Analytics</a>. Next, consider sending other errors like popup alerts and system errors as well.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: error
action: error message
label: feature or other relevant information
non-interaction: true</pre>
<h2>reCAPTCHA bot score</h2>
<p>Google Analytics does have a simple bot-filtering system in place but it comes nowhere near catching all the bots that visit your site. Even tools like reCAPTCHA by Google can’t usually say for sure whether a visitor is a bot or a human but they can give you a score (from 0.1 to 1). Simo Ahava has put together <a href="https://www.simoahava.com/amp/analytics/improve-google-analytics-bot-detection-with-recaptcha/">a great tutorial</a> for tracking the reCAPTCHA both score using Google Analytics custom dimensions.</p>
<p>Recommended event parameters:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">category: reCAPTCHA
action: reCAPTCHA answer
label: reCAPTCHA score
non-interaction: true</pre>
<hr />
<p>Don&#8217;t forget to test whatever new custom event you add to your setup.</p>
<p>Should you have any questions related to custom events in Google Analytics, shoot them in the comments below.</p>
<p>PS! If you need help with implementing custom events, <a href="https://reflectivedata.com/services/">you can hire us</a> to help you out!</p>
<p><span style="font-size: 10pt;">Photo by <a href="https://unsplash.com/@anniespratt?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Annie Spratt</a> on <a href="https://unsplash.com/s/photos/click?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span></p>
<p>The post <a href="https://reflectivedata.com/data-you-should-be-tracking-using-google-analytics-custom-events/">Data You Should Be Tracking Using Google Analytics Custom Events</a> appeared first on <a href="https://reflectivedata.com">Reflective Data</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://reflectivedata.com/data-you-should-be-tracking-using-google-analytics-custom-events/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Tracking Rage Clicks Using Google Tag Manager and Google Analytics</title>
		<link>https://reflectivedata.com/tracking-rage-clicks-using-google-tag-manager-and-google-analytics/</link>
					<comments>https://reflectivedata.com/tracking-rage-clicks-using-google-tag-manager-and-google-analytics/#comments</comments>
		
		<dc:creator><![CDATA[Silver Ringvee]]></dc:creator>
		<pubDate>Tue, 17 Sep 2019 13:27:10 +0000</pubDate>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Google Tag Manager]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Tools]]></category>
		<guid isPermaLink="false">http://reflectivedata.com/?p=3491</guid>

					<description><![CDATA[<p>Visitors rage clicking on certain elements on your website is a good indicator of a UX error. For example, people may click on a blue text that is not a link or on an image that has no click functionality.</p>
<p>The post <a href="https://reflectivedata.com/tracking-rage-clicks-using-google-tag-manager-and-google-analytics/">Tracking Rage Clicks Using Google Tag Manager and Google Analytics</a> appeared first on <a href="https://reflectivedata.com">Reflective Data</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Visitors rage clicking on certain elements on your website is a good indicator of a UX error. For example, people may click on a blue text that is not a link or on an image that has no click functionality.</p>
<p>Detecting and fixing such usability issues is crucial, and luckily the detection part is doable using Google Tag Manager and Google Analytics.</p>
<blockquote><p>Rage click is a situation where, in a short period of time, a website user clicks multiple times on a specific element. I.e. in two seconds, a visitor clicks three times on an image.</p></blockquote>
<p>Without further ado, let&#8217;s see how tracking rage clicks works in Google Tag Manager.</p>
<h3>Step 1 &#8211; Create a new Tag that detects rage clicks</h3>
<figure id="attachment_3493" aria-describedby="caption-attachment-3493" style="width: 953px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_05_21.png"><img fetchpriority="high" decoding="async" class="wp-image-3493 size-full" src="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_05_21-e1568726110732.png" alt="Google Tag Manager - detect rage click" width="953" height="719" srcset="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_05_21-e1568726110732.png 953w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_05_21-e1568726110732-700x528.png 700w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_05_21-e1568726110732-768x579.png 768w" sizes="(max-width: 953px) 100vw, 953px" /></a><figcaption id="caption-attachment-3493" class="wp-caption-text">Google Tag Manager &#8211; detect rage click</figcaption></figure>
<p>This tag is responsible for detecting rage clicks and pushing a custom event <code>rage_click</code> into the data layer.</p>
<p>There are a few variables that you can play with to make it best fit your use case:</p>
<p><code>no_of_clicks</code> &#8211; after how many clicks do we consider it a rage click. Default is 3.</p>
<p><code>time</code> &#8211; in what time period should the clicks happen. Default is 2 seconds.</p>
<p><code>radius</code> &#8211; in what radius should the clicks happen. Default is 100px.</p>
<p>The following variables are pushed into the data layer when a rage click is detected:</p>
<p><code>event</code> &#8211; <code>rage_click</code></p>
<p><code>rc_element</code> &#8211; selector of the element on which the clicks happened</p>
<p><code>rc_count</code> &#8211; the number of clicks</p>
<p><code>rc_max_distance</code> &#8211; maximum distance between the clicks</p>
<p><code>rc_time_diff</code> &#8211; period from first to last click</p>
<p>PS! You don&#8217;t have to send all of them to GA, pick the ones you think make the most sense.</p>
<p><a href="https://gist.github.com/silversillu/52ad72eaee5450ace862f39e52f6b953" target="_blank" rel="noopener noreferrer">Full code snippet</a>. &#8211; Requires jQuery to be loaded on the page.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">if ( typeof(jQuery) === 'function' ) {
    jQuery(document).ready(function($) {
        jQuery.fn.extend({
            getPath: function() {
                var path, node = this;
                while (node.length) {
                    var realNode = node[0],
                        name = realNode.localName;
                    if (!name) break;
                    name = name.toLowerCase();
                    var parent = node.parent();
                    var sameTagSiblings = parent.children(name);
                    if (sameTagSiblings.length &gt; 1) {
                        var allSiblings = parent.children();
                        var index = allSiblings.index(realNode) + 1;
                        if (index &gt; 1) {
                            name += ':nth-child(' + index + ')';
                        }
                    }
                    path = name + (path ? '&gt;' + path : '');
                    node = parent;
                }
                return path;
            }
        });
        // Number of rage clicks
        var no_of_clicks = 3;
        //Time interval - 3 for 3 secs, 4 for secs and likewise
        var time = 2;
        var click_events = [];
        //internal variables
        var possible_click = 3;
        var radius = 100;
        function detectXClicks(count, interval) {
            var last = click_events.length - 1;
            var time_diff = (click_events[last].time.getTime() - click_events[last - count + 1].time.getTime()) / 1000;
            //returns false if it event period is longer than 5 sec
            if (time_diff &gt; interval) return null;
            //check click distance
            var max_distance = 0;
            for (i = last - count + 1; i &lt; last; i++) {
                for (j = i + 1; j &lt;= last; j++) {
                    var distance = Math.round(Math.sqrt(Math.pow(click_events[i].event.clientX - click_events[j].event.clientX, 2) + Math.pow(click_events[i].event.clientY - click_events[j].event.clientY, 2)));
                    if (distance &gt; max_distance) max_distance = distance;
                    if (distance &gt; radius) return null;
                }
            }
            var result = {
                count: count,
                max_distance: max_distance,
                time_diff: time_diff
            }
            return result;
        }
        function removeUsedClickPoints(count) {
            click_events.splice(click_events.length - count, count);
        }
        $("body").click(function(event) {
            click_events.push({
                event: event,
                time: new Date()
            });
            //remain only required number of click events and remove left of them.
            if (click_events.length &gt; possible_click) {
                click_events.splice(0, click_events.length - possible_click);
            }
            //detect 3 click in 5 sec
            if (click_events.length &gt;= 3) {
                var result = detectXClicks(no_of_clicks, time);
                if (result != null) {
                    var path = $(event.target).getPath();
                    //console.log('Rage Click: ' + JSON.stringify(result));
                    dataLayer.push({
                        'event': 'rage_click',
                        'rc_element': path,
                        'rc_count': result.count,
                        'rc_max_distance': result.max_distance,
                        'rc_time_diff': result.time_diff
                    });
                    removeUsedClickPoints(3);
                }
            }
        });
    });
}</pre>
<h3>Step 2 &#8211; Create a new Trigger</h3>
<p>The snippet from the previous step is pushing the <code>rage_click</code> event into the data layer every time a rage click is detected. Now we need to create a trigger that listens to that event.</p>
<figure id="attachment_3494" aria-describedby="caption-attachment-3494" style="width: 930px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_15_22.png"><img decoding="async" class="size-full wp-image-3494" src="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_15_22.png" alt="Google Tag Manager - rage click trigger" width="930" height="463" srcset="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_15_22.png 930w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_15_22-700x348.png 700w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_15_22-768x382.png 768w" sizes="(max-width: 930px) 100vw, 930px" /></a><figcaption id="caption-attachment-3494" class="wp-caption-text">Google Tag Manager &#8211; rage click trigger</figcaption></figure>
<h3>Step 3 &#8211; Send an event to Google Analytics</h3>
<p>Awesome, now let&#8217;s create a new tag that is responsible for sending the custom event to Google Analytics.</p>
<figure id="attachment_3495" aria-describedby="caption-attachment-3495" style="width: 927px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_19_20.png"><img decoding="async" class="size-full wp-image-3495" src="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_19_20.png" alt="Send rage click to Google Analytics" width="927" height="732" srcset="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_19_20.png 927w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_19_20-700x553.png 700w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.17-16_19_20-768x606.png 768w" sizes="(max-width: 927px) 100vw, 927px" /></a><figcaption id="caption-attachment-3495" class="wp-caption-text">Send rage click to Google Analytics</figcaption></figure>
<p>You can play around with the event parameters, especially with the event label to best match your needs but the recommended values are as seen in the screenshot above.</p>
<p>Before publishing your changes, don&#8217;t forget to enter the preview mode in Google Tag Manager and test the setup yourself. Go ahead and do a few rage clicks and see if an event is getting sent to Google Analytics. Also, check the event parameters and see if they match your expectations.</p>
<h3>Step 4 &#8211; Using this data</h3>
<p>Okay, so you have configured everything correctly, tested it and it works fine. Now, how do you put this data into use?</p>
<p>First, go into Google Analytics and find your rage click events. If you did as described in this post, you find them by clicking on Overview under Behavior &#8211;&gt; Events, then find the &#8220;Rage Click&#8221; event category.</p>
<figure id="attachment_3525" aria-describedby="caption-attachment-3525" style="width: 1452px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_42_27.png"><img loading="lazy" decoding="async" class="size-full wp-image-3525" src="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_42_27.png" alt="Rage click report in Google Analytics" width="1452" height="1022" srcset="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_42_27.png 1452w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_42_27-700x493.png 700w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_42_27-768x541.png 768w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_42_27-1024x721.png 1024w" sizes="auto, (max-width: 1452px) 100vw, 1452px" /></a><figcaption id="caption-attachment-3525" class="wp-caption-text">Rage click report in Google Analytics</figcaption></figure>
<p>Click on the &#8220;Rage Click&#8221; event category and choose Event Action to see the elements on which the rage clicks happened.</p>
<p><a href="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_45_55.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-3526" src="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_45_55.png" alt="Rage click event in Google Analytics" width="1171" height="199" srcset="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_45_55.png 1171w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_45_55-700x119.png 700w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_45_55-768x131.png 768w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-analytics.google.com-2019.09.18-13_45_55-1024x174.png 1024w" sizes="auto, (max-width: 1171px) 100vw, 1171px" /></a></p>
<p>Since elements with the same selectors might be on different pages, it might be helpful to apply a secondary dimension &#8220;Page&#8221;.</p>
<p>Now, all you need to do is to pick one element, copy its selector and go to the page seen in the secondary dimension.</p>
<p>Next, open the Javascript console of your browser (press F12) and paste your selector in the following format:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">jQuery('YOUR&gt;SELECTOR&gt;HERE');</pre>
<p>Hover over the line that was returned in the console and it should highlight the element in the DOM.</p>
<figure id="attachment_3527" aria-describedby="caption-attachment-3527" style="width: 1915px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/09/Untitled-2.png"><img loading="lazy" decoding="async" class="size-full wp-image-3527" src="https://reflectivedata.com/wp-content/uploads/2019/09/Untitled-2.png" alt="Seeing the Rage Click element" width="1915" height="957" srcset="https://reflectivedata.com/wp-content/uploads/2019/09/Untitled-2.png 1915w, https://reflectivedata.com/wp-content/uploads/2019/09/Untitled-2-700x350.png 700w, https://reflectivedata.com/wp-content/uploads/2019/09/Untitled-2-768x384.png 768w, https://reflectivedata.com/wp-content/uploads/2019/09/Untitled-2-1024x512.png 1024w" sizes="auto, (max-width: 1915px) 100vw, 1915px" /></a><figcaption id="caption-attachment-3527" class="wp-caption-text">Seeing the Rage Click element</figcaption></figure>
<p>If you prefer element class over the selector, you can change the event action in GTM from the <code>rc_element</code> to GTM&#8217;s built-in Click Class variable.</p>
<hr />
<p>Great! That&#8217;s it, should you need any help with tracking rage clicks using Google Tag Manager and Google Analytics, post your questions in the comments below.</p>
<p>Should you need further help with your analytics setup, <a href="https://reflectivedata.com/services/" target="_blank" rel="noopener noreferrer">take a look at our services</a>.</p>
<p><span style="font-size: 10pt;">Cover photo by <a href="https://unsplash.com/@axville?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Emmanuel</a> on <a href="https://unsplash.com/search/photos/click?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span></p>
<p>The post <a href="https://reflectivedata.com/tracking-rage-clicks-using-google-tag-manager-and-google-analytics/">Tracking Rage Clicks Using Google Tag Manager and Google Analytics</a> appeared first on <a href="https://reflectivedata.com">Reflective Data</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://reflectivedata.com/tracking-rage-clicks-using-google-tag-manager-and-google-analytics/feed/</wfw:commentRss>
			<slash:comments>26</slash:comments>
		
		
			</item>
		<item>
		<title>Tracking Optimize Anti-Flicker Snippet Timeout in Google Analytics</title>
		<link>https://reflectivedata.com/tracking-optimize-anti-flicker-snippet-timeout-in-google-analytics/</link>
					<comments>https://reflectivedata.com/tracking-optimize-anti-flicker-snippet-timeout-in-google-analytics/#comments</comments>
		
		<dc:creator><![CDATA[Silver Ringvee]]></dc:creator>
		<pubDate>Wed, 04 Sep 2019 13:15:40 +0000</pubDate>
				<category><![CDATA[A/B testing]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Google Optimize]]></category>
		<category><![CDATA[Google Tag Manager]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Tools]]></category>
		<guid isPermaLink="false">http://reflectivedata.com/?p=3451</guid>

					<description><![CDATA[<p>If you have any experience with JavaScript-based A/B testing and/or personalization tools you know that flicker can be a real headache.</p>
<p>In case your tool of choice is Google Optimize, you should be using their official anti-flicker snippet to minimize the flicker effect.</p>
<p>The post <a href="https://reflectivedata.com/tracking-optimize-anti-flicker-snippet-timeout-in-google-analytics/">Tracking Optimize Anti-Flicker Snippet Timeout in Google Analytics</a> appeared first on <a href="https://reflectivedata.com">Reflective Data</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you have any experience with JavaScript-based A/B testing and/or personalization tools you know that <a href="https://reflectivedata.com/fooc-get-rid/">flicker</a> can be a real headache.</p>
<p>In case your tool of choice is <a href="https://reflectivedata.com/dictionary/google-optimize/">Google Optimize</a>, you should be using their official <a href="https://support.google.com/optimize/answer/7100284?hl=en">anti-flicker snippet</a> to minimize the flicker effect.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="html">&lt;!-- Anti-flicker snippet (recommended) --&gt;
&lt;style&gt;.async-hide { opacity: 0 !important} &lt;/style&gt;
&lt;script&gt;(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date; h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')}; (a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c; })(window,document.documentElement,'async-hide','dataLayer',4000, {'OPT_CONTAINER_ID':true});&lt;/script&gt;</pre>
<p>Looking at the anti-flicker snippet (previously known as page-hiding snippet), you see that the default timeout is set to 4000ms. That means that, potentially, some of your visitors may see a blank white page for 4 seconds.</p>
<p>Since four seconds is a long time, many companies reduce it. A common timeout I&#8217;ve seen is 2 seconds. Changing the maximum timeout to a shorter period, although, means that there can be a good amount of people to whom the snippet occasionally times out.</p>
<p>When the anti-flicker snippet times out, no experiments will be loaded on that page load (people will see the control for all experiments and personalizations) which can lead to a user experience where a single user is seeing different variations in single session.</p>
<p>What you probably want to know is the optimal timeout period for your website. To figure that out, you&#8217;d need to know how many timeouts occur with your current setup. Let&#8217;s take a look how to set that up using Google Tag Manager and Google Analytics.</p>
<p>Before moving forward, you should read about <a href="https://developers.google.com/optimize/devguides/antiflicker">how the anti-flicker snippet works</a>.</p>
<h3>Catching the timeout</h3>
<p>To make this a little bit easier for us, Google has added a variable in the data layer that indicates whether the snipped has timed out or not.</p>
<p>You can access this variable like so:</p>
<p><code>window.dataLayer.hide["GTM-xxxxxx"]</code> where <code>GTM-xxxxxx</code> stands for your Optimize container ID.</p>
<p>To make sure it&#8217;s not too easy, though, they don&#8217;t push this variable into the data layer as you normally would. This means you can&#8217;t access it using GTM Data Layer variable nor the Custom Javascript variable.</p>
<p>What you need is a Custom Javascript function variable in GTM to check the value.</p>
<p>Here&#8217;s the function you can use</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">function () { 
    if ( window.dataLayer.hide ) { 
        return window.dataLayer.hide["GTM-xxxxxxx"]; 
    } 
}</pre>
<p>And here is the same function implemented in Google Tag Manager.</p>
<figure id="attachment_3452" aria-describedby="caption-attachment-3452" style="width: 1296px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-15_44_18.png"><img loading="lazy" decoding="async" class="size-full wp-image-3452" src="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-15_44_18.png" alt="Tracking Optimize anti-flicker snippet timeout using Google Analytics" width="1296" height="676" srcset="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-15_44_18.png 1296w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-15_44_18-700x365.png 700w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-15_44_18-768x401.png 768w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-15_44_18-1024x534.png 1024w" sizes="auto, (max-width: 1296px) 100vw, 1296px" /></a><figcaption id="caption-attachment-3452" class="wp-caption-text">Tracking Optimize anti-flicker snippet timeout</figcaption></figure>
<p>PS! In the beginning, the value is always <code>true</code>, it turns to <code>false</code> if the timeout period is over and it managed to load Optimize before this happened (the snippet did not time out).</p>
<p>Our recommendation is to check the value on GTM&#8217;s default <code>DOM Ready</code> event.</p>
<h3>Sending data to Google Analytics</h3>
<p>This part is quite straightforward for anyone that has used GTM to send custom events to Google Analytics so let&#8217;s get right to it.</p>
<h4>1. Create the DOM Ready trigger</h4>
<p>In case you haven&#8217;t configured this default trigger in GTM, go ahead do it now.</p>
<figure id="attachment_3456" aria-describedby="caption-attachment-3456" style="width: 1299px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_03_31.png"><img loading="lazy" decoding="async" class="wp-image-3456 size-full" src="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_03_31.png" alt="Google Tag Manager DOM Ready Event" width="1299" height="375" srcset="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_03_31.png 1299w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_03_31-700x202.png 700w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_03_31-768x222.png 768w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_03_31-1024x296.png 1024w" sizes="auto, (max-width: 1299px) 100vw, 1299px" /></a><figcaption id="caption-attachment-3456" class="wp-caption-text">Google Tag Manager DOM Ready Event</figcaption></figure>
<h4>2. Create a new Tag for sending the event to Google Analytics</h4>
<p>Create a new Tag with a tag type of <strong>Google Analytics: Universal Analytics</strong> and choose track type of <strong>Event</strong>.</p>
<p>These are the recommended event parameters but you can use whatever works for you.</p>
<p><strong>Category:</strong> optimize</p>
<p><strong>Action:</strong> timeout</p>
<p><strong>Label:</strong> true/false (using the Custom Javascript function variable you created before)</p>
<p><strong>Non-Interaction Hit:</strong> True (because it&#8217;s not related to a user action)</p>
<figure id="attachment_3457" aria-describedby="caption-attachment-3457" style="width: 1287px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_07_34.png"><img loading="lazy" decoding="async" class="size-full wp-image-3457" src="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_07_34.png" alt="Tracking Optimize anti-flicker snippet timeout using Google Analytics" width="1287" height="757" srcset="https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_07_34.png 1287w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_07_34-700x412.png 700w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_07_34-768x452.png 768w, https://reflectivedata.com/wp-content/uploads/2019/09/screenshot-tagmanager.google.com-2019.09.04-16_07_34-1024x602.png 1024w" sizes="auto, (max-width: 1287px) 100vw, 1287px" /></a><figcaption id="caption-attachment-3457" class="wp-caption-text">Tracking Optimize anti-flicker snippet timeout using Google Analytics</figcaption></figure>
<p>That&#8217;s it. This is all you need to start tracking Optimize anti-flicker snippet timeouts using Google Tag Manager and Google Analytics.</p>
<h3>How to use this data?</h3>
<p>Your goal should be to find the optimal timeout duration for your website and audience. The percentage of users who experience the timeout should be kept under 10% and you might consider excluding those with timeouts from your post-analysis process using a custom segment in Google Analytics.</p>
<hr />
<p>Any questions or ideas? As always, feel free to post them in the comments below.</p>
<p>The post <a href="https://reflectivedata.com/tracking-optimize-anti-flicker-snippet-timeout-in-google-analytics/">Tracking Optimize Anti-Flicker Snippet Timeout in Google Analytics</a> appeared first on <a href="https://reflectivedata.com">Reflective Data</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://reflectivedata.com/tracking-optimize-anti-flicker-snippet-timeout-in-google-analytics/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>How to Detect and Track Incognito Users with Google Analytics and Google Tag Manager</title>
		<link>https://reflectivedata.com/how-to-detect-track-incognito-users-with-google-analytics-and-google-tag-manager/</link>
					<comments>https://reflectivedata.com/how-to-detect-track-incognito-users-with-google-analytics-and-google-tag-manager/#comments</comments>
		
		<dc:creator><![CDATA[Silver Ringvee]]></dc:creator>
		<pubDate>Thu, 04 Apr 2019 12:23:58 +0000</pubDate>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Google Tag Manager]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Tools]]></category>
		<guid isPermaLink="false">http://reflectivedata.com/?p=3188</guid>

					<description><![CDATA[<p>Depending on the type of website you are working with, it is likely that some percentage of your users are using their browser in incognito or private mode.</p>
<p>Since using incognito mode can skew the numbers you see in analytics, it is really good to know the estimated percentage of visitors that prefer to stay incognito.</p>
<p>The post <a href="https://reflectivedata.com/how-to-detect-track-incognito-users-with-google-analytics-and-google-tag-manager/">How to Detect and Track Incognito Users with Google Analytics and Google Tag Manager</a> appeared first on <a href="https://reflectivedata.com">Reflective Data</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Depending on the type of website you are working with, it is likely that some percentage of your users are using their browser in incognito or private mode.</p>
<p>Since using incognito mode can skew the numbers you see in analytics, it is really good to know the estimated percentage of visitors that prefer to stay incognito.</p>
<h4>What kind of implications does incognito mode cause?</h4>
<ul>
<li><strong>Inaccurate user count</strong> &#8211; every session is a new user</li>
<li><strong>Inaccurate sessions per user count</strong> &#8211; incognito users will always have only one session</li>
<li><strong>Broken A/B testing logic</strong> &#8211; users in incognito are likely to see different variation every time they visit</li>
<li><strong>Broken promotions</strong> &#8211; users are likely to see &#8220;only once&#8221; popups and other elements in every session</li>
</ul>
<h3>Tracking incognito users in Google Analytics</h3>
<p>Unfortunately, browsers don&#8217;t have a default solution for detecting whether users are in incognito or not. Nor are they making it easy to figure it out using custom Javascript.</p>
<p>For every browser, the solution is a bit different and they might be changing when a new version of the browser is released. We are doing our best to keep this post up to date.</p>
<p>Here&#8217;s the Google Tag Manager setup that we are using to track incognito visitors to Reflective Data blog.</p>
<h4>Google Tag Manager custom HTML tag</h4>
<p><strong>Name:</strong> Detect Incognito Browser</p>
<p><strong>Type:</strong> Custom HTML</p>
<p><strong>Trigger:</strong> All Pages</p>
<p><strong>Code:</strong></p>
<div>
<pre class="lang:default decode:true ">&lt;script&gt;
(function (cb) {
    var db,
    on = cb.bind(null, 'true'),
    off = cb.bind(null, 'false')

    function tryls() {
        try {
            localStorage.length ? off() : (localStorage.x = 1, localStorage.removeItem("x"), off());
        } catch (e) {
            // Safari only enables cookie in private mode
            // if cookie is disabled then all client side storage is disabled
            // if all client side storage is disabled, then there is no point
            // in using private mode
            navigator.cookieEnabled ? on() : off();
        }
    }

    // Blink (chrome &amp; opera)
    window.webkitRequestFileSystem ? webkitRequestFileSystem(0, 0, off, on)
    // FF
    : "MozAppearance" in document.documentElement.style ? navigator.serviceWorker ? off() : on()
    // Safari
    : /constructor/i.test(window.HTMLElement) || window.safari ? tryls()
    // IE10+ &amp; edge
    : !window.indexedDB &amp;&amp; (window.PointerEvent || window.MSPointerEvent) ? on()
    // Rest
    : off()
})(function (isPrivateMode) { window.dataLayer.push({event: 'detected_incognito', is_incognito: isPrivateMode}); });
&lt;/script&gt;
</pre>
<p>Credit: This code is a slightly modified version of the <a href="https://stackoverflow.com/a/37091058/4769218">snippet</a> posted on Stack Overflow by the user Endless.</p>
<p>Works in the following browsers:</p>
<ul>
<li>Chrome</li>
<li>Firefox</li>
<li>Safari</li>
<li>IE 10+</li>
<li>Edge</li>
</ul>
<h4>Google Tag Manager Data Layer variable</h4>
<p><strong>Name:</strong> DLV &#8211; Is Incognito</p>
<p><strong>Data Layer Variable Name:</strong> is_incognito</p>
<p><strong>Data Layer Version:</strong> Version 2</p>
<figure id="attachment_3190" aria-describedby="caption-attachment-3190" style="width: 1155px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-08-56.png"><img loading="lazy" decoding="async" class="size-full wp-image-3190" src="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-08-56.png" alt="Google Tag Manager Is Incognito Data Layer Variable" width="1155" height="595" srcset="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-08-56.png 1155w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-08-56-700x361.png 700w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-08-56-768x396.png 768w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-08-56-1024x528.png 1024w" sizes="auto, (max-width: 1155px) 100vw, 1155px" /></a><figcaption id="caption-attachment-3190" class="wp-caption-text">Google Tag Manager Is Incognito Data Layer Variable</figcaption></figure>
<h4>Google Tag Manager Custom Event trigger</h4>
<p><strong>Name:</strong> CE &#8211; Detected Incognito</p>
<p><strong>Event name:</strong> detected_incognito</p>
<p><strong>This trigger fires on:</strong> All Custom Events</p>
<figure id="attachment_3191" aria-describedby="caption-attachment-3191" style="width: 1145px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-11-05.png"><img loading="lazy" decoding="async" class="size-full wp-image-3191" src="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-11-05.png" alt="Google Tag Manager Detected Incognito Custom Trigger" width="1145" height="607" srcset="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-11-05.png 1145w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-11-05-700x371.png 700w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-11-05-768x407.png 768w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-11-05-1024x543.png 1024w" sizes="auto, (max-width: 1145px) 100vw, 1145px" /></a><figcaption id="caption-attachment-3191" class="wp-caption-text">Google Tag Manager Detected Incognito Custom Trigger</figcaption></figure>
<h4>Google Tag Manager Google Analytics tag</h4>
<p><strong>Name:</strong> UA &#8211; Is Incognito Browser</p>
<p><strong>Type:</strong> Event</p>
<p><strong>Category:</strong> browser_info</p>
<p><strong>Action:</strong> incognito</p>
<p><strong>Label:</strong> {{DLV &#8211; Is Incognito}}</p>
<p><strong>Non-Ineraction Hit:</strong> True</p>
<figure id="attachment_3192" aria-describedby="caption-attachment-3192" style="width: 1140px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-14-29.png"><img loading="lazy" decoding="async" class="size-full wp-image-3192" src="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-14-29.png" alt="Google Tag Manager Is Incognito Browser Tag" width="1140" height="918" srcset="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-14-29.png 1140w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-14-29-700x564.png 700w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-14-29-768x618.png 768w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-14-29-1024x825.png 1024w" sizes="auto, (max-width: 1140px) 100vw, 1140px" /></a><figcaption id="caption-attachment-3192" class="wp-caption-text">Google Tag Manager Is Incognito Browser Tag</figcaption></figure>
<h4>Bonus: sending data to a custom dimension</h4>
<p>The previous setup sends incognito usage info to Google Analytics as a custom event. In some cases, having it as a custom dimension could be more useful. Here&#8217;s how you set that up.</p>
<ol>
<li>Go to Admin panel of your Google Analytics account</li>
<li>In property settings, choose Custom Dimensions under Custom Definitions</li>
<li>Add a new Custom Dimension</li>
</ol>
<p><strong>Name:</strong> Is Incognito<br />
<strong>Scope:</strong> Session</p>
<p>Now, remember the index your newly created dimension has. In our case, it is 12.</p>
<p>Modify your Google Tag Manager tag &#8220;UA &#8211; Is Incognito Browser&#8221; to include a Custom Dimension and set its value equal to {{DLV &#8211; Is Incognito}}.</p>
<figure id="attachment_3193" aria-describedby="caption-attachment-3193" style="width: 612px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-18-59.png"><img loading="lazy" decoding="async" class="size-full wp-image-3193" src="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-tagmanager.google.com-2019.04.04-15-18-59.png" alt="Google Tag Manager Is Incognito in a Custom Dimension" width="612" height="119" /></a><figcaption id="caption-attachment-3193" class="wp-caption-text">Google Tag Manager Is Incognito in a Custom Dimension</figcaption></figure>
<h3>Using this in reports</h3>
<p>Congratulations! If you did everything correctly, you will soon see data about incognito users flowing into Google Analytics.</p>
<p>There are several ways how you can include this data in your reports but perhaps you will find using it in custom segments the most useful. This allows you to see how regular vs incognito users perform based on any metric you track in Google Analytics.</p>
<p>Also, you could build all kinds of custom reports. Here&#8217;s a very basic one that&#8217;s good for testing if your setup works as expected.</p>
<figure id="attachment_3201" aria-describedby="caption-attachment-3201" style="width: 884px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-08-41.png"><img loading="lazy" decoding="async" class="size-full wp-image-3201" src="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-08-41.png" alt="Incognito vs Regular Users Custom Report Setup" width="884" height="753" srcset="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-08-41.png 884w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-08-41-700x596.png 700w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-08-41-768x654.png 768w" sizes="auto, (max-width: 884px) 100vw, 884px" /></a><figcaption id="caption-attachment-3201" class="wp-caption-text">Incognito vs Regular Users Custom Report Setup</figcaption></figure>
<p>And here&#8217;s how it will look like.</p>
<figure id="attachment_3200" aria-describedby="caption-attachment-3200" style="width: 909px" class="wp-caption aligncenter"><a href="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-09-15.png"><img loading="lazy" decoding="async" class="size-full wp-image-3200" src="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-09-15.png" alt="Incognito vs Regular Users Custom Report Results" width="909" height="806" srcset="https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-09-15.png 909w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-09-15-700x621.png 700w, https://reflectivedata.com/wp-content/uploads/2019/04/screenshot-analytics.google.com-2019.04.10-17-09-15-768x681.png 768w" sizes="auto, (max-width: 909px) 100vw, 909px" /></a><figcaption id="caption-attachment-3200" class="wp-caption-text">Incognito vs Regular Users Custom Report Results</figcaption></figure>
<p>As we can see from the custom report above, our demo site received 794 sessions, out of which 4.3% came from browsers turned into incognito mode.</p>
<hr />
<p>That&#8217;s it &#8211; now you have information about users that have turned their browser into incognito or private mode and how big impact they might have on your metrics and A/B testing program.</p>
<p>If you have any questions or ideas for improvement, please let us know in the comments below.</p>
</div>
<p>The post <a href="https://reflectivedata.com/how-to-detect-track-incognito-users-with-google-analytics-and-google-tag-manager/">How to Detect and Track Incognito Users with Google Analytics and Google Tag Manager</a> appeared first on <a href="https://reflectivedata.com">Reflective Data</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://reflectivedata.com/how-to-detect-track-incognito-users-with-google-analytics-and-google-tag-manager/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
	</channel>
</rss>
