How to Track Light/Dark Mode in Google Analytics through Google Tag Manager

Have you ever been on your phone late at night and you visit a web page and you’re suddenly blinded? Light and dark mode could ease that pain for your users, to give them a more pleasant experience. Thankfully, there is a CSS Media query which you can use to control it. Tracking visits at a session-level, whether they have light mode or dark mode enabled, could help give you some insight to see if visitors are even using that. This tutorial will walk you through how to track dark and light mode at a session-level within Google Analytics (GA), …

Continue ReadingHow to Track Light/Dark Mode in Google Analytics through Google Tag Manager

How to Track Ad Block Usage in Google Analytics through Google Tag Manager

In this guide, I’ll walk you through how to add track sessions that have ad blocking enabled, through Google Tag Manager (GTM) and Google Analytics (GA). Here’s a glance, similar to what you will see in your Google Analytics profile, after implementing the tag and variable in GTM. Data Preview Step 1 Click into your container. Step 2 Create a new Tag, as Custom HTML. This Javascript snippet will create a 1×1 ad unit that will always be triggered by an adblocker. It checks to see if the unit was able to be created and has a height, and if …

Continue ReadingHow to Track Ad Block Usage in Google Analytics through Google Tag Manager