Salocin Group
Your cookie preferences

We use cookies to ensure this website functions properly, to analyse website traffic and for marketing purposes.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
Cookie policy Privacy policy {title}
Edit
Contact us
Salocin Group Leaders in data and AI-enabled connected customer experiences
Edit Engineers of connected customer experiences
Join the Dots Independent, data-led media thinking for sustainable growth
Wood for Trees Optimisers of future fundraising performance
  • Home
  • Our services
    • Cloud solutions
    • Data science
    • Modern Data Platform
    • Privacy and AI compliance
  • Our partners
    • Apteco
    • Creatio
    • Microsoft
    • Salesforce
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • About Salocin Group
    • Careers
  • Contact Salocin Group
  • Home
  • Who we are
    • B Corp
    • Careers
  • Our work
  • What we do
    • Intelligent data
    • Marketing technology
    • Transformational CRM
    • Our technology partners
    • Privacy review
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • Contact Edit
  • Home
  • Broadcast media
  • Digital media
  • Print
    • Direct mail
  • Data
    • Our work with Herdify
    • EPiC
  • Media agency
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • About Join the Dots
    • Careers
  • Contact Join the Dots
  • Home
  • Services
    • Actionable insight
    • Data discovery
    • Data engineering
    • Data hygiene
    • Privacy review
  • Products
    • InsightHub
    • Apteco
    • Microsoft
    • Data management
    • Consent and preference management
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • About Wood for Trees
    • Operating principles
    • Careers
  • Contact Wood for Trees
Blog

Using GTM to avoid (not set) in Google Analytics

By Edit | 26 Jun 2018

If you use a Google Tag Manager variable whose type is “number” to send data to Google Analytics, you may notice that some of your data comes through as (not set), rather than the value you wanted.

The example above shows an event label which is pulled in from the score on a quiz with 5 questions. This is pulled when the quiz is completed. There is one score missing – 0.

Using Google Tag Manager debugger, I can tell that the variable fires from the data layer as 0. It doesn’t appear as (not set) or undefined.

Above: score – Data Layer Variable – number – 0

As well as this, if I look at the event firing, the label it is pulling in is 0.

Above: Label – 0

From this information, it seems that the event label in Google Analytics will be 0. However, along the way 0 is transformed to (not set). This is not the first time I’ve noticed Google Tag Manager debugger reading unreliably.

TIP: When debugging, make sure to check the real-time data in Google Analytics after your tag is live, to ensure the data appears as expected.

I managed to rewrite (not set) to 0 by creating a new look-up table variable which maps 0 to itself. Because all the other scores were working I set the default value as the original score, so they would remain unchanged. I then used this new variable as the label for the event tag.

What this new variable does is transform 0 from a number to a string. For some reason Google Analytics parses the number 0 as (not set) but the string ‘0’ as 0.

Reviewing what Google Tag Manager Debugger shows you can see the slight difference in using score (number) and score string (string) as a variable.

In Google Analytics we can now read the event label as 0 instead of (not set).

There are some other solutions that I haven’t personally tried, such as ensuring the data layer variable is coded as a string to begin with (unless you’re using this variable as a metric or for some other calculations) or using a custom JavaScript variable to transform numbers to strings. There may be other scenarios where this occurs, but the number 0 is the only instance I’ve noticed this occurring.

Share this

  • Email
  • WhatsApp
  • LinkedIn
  • Facebook
  • X (Twitter)

More insights

AI isn’t going to take your job (unless you really want it to) 
Blog

AI isn’t going to take your job (unless you really want it to) 

By Edit | 18 Jun 2024
Customer relationship marketing: How generative AI is revolutionising engagement  
Blog

Customer relationship marketing: How generative AI is revolutionising engagement  

By Edit | 4 Apr 2024
Personalisation as a process
Blog

Personalisation as a process

By Edit | 8 Mar 2024
  • Privacy policy
  • Cookie policy
  • Ts&Cs
  • Report a concern

© 2025 Edit, part of Salocin Group Ltd. All rights reserved. Company no.: 0362​4881. VAT no.: 4208​34911.

Salocin Group Certified B Corporation | Cyber Essentials Certified | British Assessment Bureau, ISO 27001 Information Security Management