Running Hotjar polls on specific events through Google Tag Manager

Recently I had to run a Hotjar poll after a successful signup uncovering hooks. We wanted to ask users what persuaded them to sign up. But our registration is not happening on a dedicated thank-you page – there’s a GTM data layer event which is loaded when a signup happens.

For Plus and Business accounts (paid) Hotjar offers an option in poll settings called JavaScript Triggers. So that’s what we’ll use here. Let’s build a new poll by going to Polls – New and give it a name.

On the Targeting step we’ll click On pages I specify and select the last option (unfortunately it will be active in paid plans only)

Hotjar polls JS trigger

We’ll call the Hotjar event ‘success’, so that’s what I’ll enter here:

poll settings

Finish the rest of the poll setup: Question, Appearance and Behavior, and let’s head to Google Tag Manager to add the special JavaScript trigger that will show the poll on the specific event we want.

Start by creating a new Custom HTML tag in GTM. Give it a name and paste the following in the HTML box:

<script>
hj(‘trigger’, ‘success’);
</script>

It comes from the Hotjar documentation on JavaScript triggers.

Here’s our tag, where I’ve selected an existing datalayer event for trrigger:

Hotjar poll tag in GTM

That’s it – just save and publish the tag in GTM and enable your poll in Hotjar!

5 Google Analytics posts you don’t want to miss in July

Here’s again the last post of the month saved for the top 5 interesting Google Analytics related resources I found on other sites. Here are the five for July – you may want to bookmark those as they can be very useful:

Vimeo Tracking with Google Tag Manager

If you want to track how users are interacting with your embedded Vimeo videos, here is a step by step guide to setting up Vimeo tracking using Google Tag Manager (GTM) from Cardinal Path.

Using the Google Analytics Site Search reports

This Loves Data post shows you how to configure your Site Search reports in Google Analytics, explains the Search Terms, Pages and Usage reports, how to understand the post-search navigation and identify post-search issues.

9 Ways to Ensure Ad Tags Work in Google Tag Manager

Implementing tags in GTM from different platforms can be tricky especially if they are custom and require values that are not readily available. LunaMetrics shows 9 ways to ensure they work.

Visualize Any Data With Free Google Data Studio

A very nice walk-through Google’s new Data Studio product: what to use it for, dynamic updates through its live connection with Google products, great sharing and visualizing capabilities.

The Google Analytics Audit Checklist

Use this Google Analytics audit checklist based on Google Sheets from Distilled to make sure your setup provides accurate measurement and your GA account is free of spam or internal sessions, has proper goal tracking and accurate ecommerce tracking.

P.S. Got a Google Analytics question? Send it to me and I’ll try to answer it on the blog.

5 Google Analytics posts you don’t want to miss in June

Here’s again the last post of the month saved for the top 5 interesting Google Analytics related resources I found on other sites. Here are the five for June – you may want to bookmark those as they can be very useful:

How-to Match Your Google Analytics Transactions With Reality

Usually ecommerce clients ask me why the sales numbers in GA don’t match their shopping cart systems. In this article you’ll learn the acceptable level of difference, what the reasons may be and some workarounds when your shopping cart doesn’t allow tracking.

AdWords Call Conversion Tracking with Google Tag Manager

This post shows you how to use Google Forwarding Numbers and GTM to measure calls from your website (not your ad extensions) as success metrics in the evaluation of your Google AdWords account. You will be able to see which campaigns, ad groups, and keywords produce the greatest call volume and optimize accordingly.

Android Google Search App Traffic Appears as Referral Source in Google Analytics

For a month or so you’ll see a new referral source in GA reports called “com.google.android.googlequicksearchbox”. It’s actually organic search traffic from the google android app. Updates were released on 6/9/16 and now referrals from this source are shown as Direct traffic.

Measure Google Tag Manager Event Duration

In this post Simo shows how to measure how much time it takes for GTM events to resolve. He uses User Timings to measure all sorts of important milestones, such as just how long it takes for a font or jQuery library to download.

Using Google Tag Manager to Dynamically Generate Schema/JSON-LD Tags

Here you’ll learn how to use Google Tag Manager to insert JSON-LD into a page, allowing you to add Schema markup to your site without having to touch the site’s code directly. The example is for blogs, but a similar approach can be used for other types of sites too.

P.S. Got a Google Analytics question? Send it to me and I’ll try to answer it on the blog.

5 Google Analytics posts you don’t want to miss in May

Here’s again the last post of the month saved for the top 5 interesting Google Analytics related resources I found on other sites. Here are the five for May – you may want to bookmark those as they can be very useful:

Ad Block Tracking With Google Analytics: Code, Metrics, Reports

Here Avinash explains what’s an ad block and offers a tracking code change through Google Tag Manager or directly together with setting the custom dimensions and segments in Google Analytics. The last part shows 5 reports and KPIs that deliver critical insights from ad blocking behavior. If you’re concerned about your customers using ad blockers, this is the way to understand its impact.

Seer’S Google Analytics heatmap to find your website’s peak times [Download]

Inspired by the heatmap feature in the redesigned GA Mobile App, the Analytics Team at Seer built a Google sheet that you can save in your account which allows you to heatmap certain metrics to identify growing or hot trends over time. It’s really cool, so check it out with your data!

#GTMTips: Using document.write Safely In GTM Tags

Simo’s blog is again featured 2 times this month. This first one is a guest post by Dan Wilkerson from LunaMetrics about the document.write() method used in the Google Tag Manager Custom HTML tags. It explains the problems with having document.write in your 3rd party marketing tags and the proper way to run them in GTM.

Simple Tracker Duplication For Universal Analytics

If you need to easily implement a roll-up GA property with exact hit duplication, this plugin that Simo developed can help. The implementation is straightforward and is recommended to use it with on-page Universal Analytics tracking, not with Google Tag Manager.

Announcing Data Studio: our free, new, Data Visualization Product

Google announced a free version of Data Studio for individuals and smaller teams and you can access it at http://google.com/analytics/data-studio There are a couple of videos about it in the GA Youtube channel and it looks great! You can connect all your marketing data (GA, AdWords, Google Sheets, BigQuery and soon SQL databases to access first party data) and turn that data into beautiful, informative reports that are easy to understand, share (like Google Docs), and fully customizable.

P.S. Got a Google Analytics question? Send it to me and I’ll try to answer it on the blog.

5 Google Analytics posts you don’t want to miss in April (+ 3 extra)

Here’s again the last post of the month saved for the top 5 interesting Google Analytics related resources I found on other sites. Here are the five (and 3 extra) for April – you may want to bookmark those as they can be very useful:

How to Use GTM Download Redirects to track Links, Downloads and Email Clicks | Measureschool

In this video (9:27 min) Julian shows how to track email links, downloads and other outbound resources sent in an email more precisely with a combination of redirects in Google Tag Manager and Google Analytics. It’s pretty cool!

Tracking Funnels With Google Analytics Enhanced Ecommerce Tracking | Measureschool

In this video (17:04 min) Julian shows how to build you own customized funnel using Enhanced Ecommerce tracking in Google Analytics and Google Tag Manager, even if you don’t have an Ecommerce website. This will help you get super actionable insights and segments to help you in your marketing.

Panic Time or False Alarm? A Beginner’s Guide to Traffic Drop Analysis

This step-by-step guide from Distilled will help you understand your client’s traffic drop – is it a real problem, seasonality or broken tracking issue? This post will walk you through the process of confirming what actually happened and understanding why it happened in the first place.

Why Am I Seeing 307 Redirects on My Google Analytics Collect Hits?

Maybe you noticed the duplicated or redirected Google Analytics hits in the network tab of browser’s developer tools. GA didn’t really announced their migration to HTTPS and this post by Analytics Pros was quick to explain the reason. HTTP requests with a status code 307 are not sent to GA and only serve as redirects, so your hits are not double counted.

Google Analytics – Querystring parameter INCLUSION is the new black

As sites grow in scale and complexity, more query string parameters are showing up in page paths that may pollute your data and artificially inflate cardinality in pages reports. This blog explains how to use a series of filters to include only the useful query string parameters we want – all others are excluded.

#GTMTips: The Timer Trigger

Here Simo shows how to create your own timer in GTM which fires after a certain amount of time has passed on the web page. This is especially useful if you want to start a timer based on a user interaction such as a click, but this option is not available in the current GTM version.

Buy-To-Cart Rates by Digging Deep in GA Enhanced Ecommerce

This LunaMetrics post shows how to answer questions like what’s the likelihood that a user put something in their cart and then purchased at some point later, which goes beyond the standard Enhanced Ecommerce reports in GA. You can do this both with the free version and GA 360 and discover metrics like buy-to-cart rate within N days and average purchase lag.

More Accurate Conversion Data with Sequence Segments

Another LunaMetrics post this month showing how to use sequence segments to answer questions like: Is that new page of content driving more lead forms? Is this month’s home page banner driving more free trial sign-ups? You specify conditions for each step, and each step must occur in order.

P.S. Got a Google Analytics question? Send it to me and I’ll try to answer it on the blog.