• Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login
  • Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login

August 13, 2019

What’s this? “No tags were evaluated because there was no event in the selected message”

So here’s a scenario that probably brought you to this page: you have enabled GTM preview and debug mode and see a Message in it. When you click it, you see the following message: no tags were evaluated because there was no event in the selected message.

What does it mean? What are its implications and how does it affect your tag management? You’ll find answers to all of these questions below.

Google Tag Manager Ebook Bundle

What is this “Message” in the first place?

You’re probably used to seeing some actual event names in Preview and Debug mode’s event stream, e.g. Click, Scroll Depth, History, etc.

But out of a sudden, a mysterious Message appeared. What is it?

If you’re already familiar with the Data Layer, you know that the event stream in Preview and Debug mode displays all dataLayer.push’es. Message is just another dataLayer.push but without the “event” key.

If, for example, I activate the code below:

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  'formLocation': 'footer',
  'event': 'new_subscriber'
});

… new_subscriber will appear in the event stream because it contains ‘event’ : ‘new_subscriber’.

However, if I (or a developer) activate this code on a page:

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  'formLocation': 'footer'
});

All you will see is a Message. That’s because there is no “event” key in the push. And in fact, there are some consequences (explained in the next chapter).

 

What are the implications of “Message”?

If some info was pushed to the dataLayer without the “event” key and the Message appears, this means that you cannot fire tags at that moment. Even though the information was indeed pushed to the DL (dataLayer) successfully, you cannot trigger tags, that’s how Google Tag Manager works.

Do you want to fire a tag on a certain dataLayer.push? Well, you need to make sure that the push also contains an “event” key with some value (event name).

And also, the earliest moment when you can access that information in the Data Layer is the next dataLayer.push that contains the “event” key.

And that’s exactly what the notification in the preview mode “No tags were evaluated because there was no event in the selected message” means:

  • “No tags were evaluated” means that no tags would have fired
  • “Because there was no event in the selected message” means that there was no “event” key in the dataLayer.push

 

Example

Let’s imagine that there were consecutive 3 dataLayer.push’es on a page. The first one:

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  'userID': '123abc'
});

The 2nd one:

window.dataLayer.push({
  'pricingPlan': 'premium'
});

And the 3rd one:

window.dataLayer.push({
  'event': 'login'
});

The GTM Preview and Debug mode would look like this:

preview and debug mode

And the earliest moment when you could fire a tag would be the 3rd push because it has an “event” key with the “login” value. Only then you could use a Custom Event trigger and activate your tag (e.g. GA Event tag that sends the “login” event to Google Analytics and also passes the user ID + pricing plan.

 

Key takeaways

That’s why I try to follow the best practice: always make sure that dataLayer.push includes an “event” key. Even if you don’t plan to use that push to fire tags now, you don’t know whether it will be needed sometime in the future.

And once that day comes (when you need to fire a tag), your dataLayer.push will be ready (and there will be no need to ask a developer for additional changes).

So, to sum up this quick blog post:

  • Message means that there was a dataLayer.push on a page but it did not include the “event” key
  • You won’t be able to fire tags or retrieve the latest value that was pushed with the Message. The earliest moment you will be able to do that is the next dataLayer.push that contains the “event” key.
  • It’s better to always include the “event” key in the dataLayer.push

 

 

Julius Fedorovicius
In Google Tag Manager Tips
7 COMMENTS
Robert
  • Sep 25 2020
  • Reply

Hi,

Thanks for all your advice.

Unfortunally, this article dont solve my question.
Is "No tags were evaluated" an error?
And if how get I rid of it?

    Julius
    • Sep 25 2020
    • Reply

    This is not a problem. You don't get rid of it. It just means that a dataLayer.push does not contain an "event" key.

    You can ask a developer to include the key if you want. But as I said, this is not a problem usually.

      Robert
      • Sep 25 2020
      • Reply

      Thanks. Helps a lot!

Chints
  • Dec 7 2021
  • Reply

Thanks for the informative article.

Also is there a way in which we can update the event key for a particular message (datalayer push) using GTM (Google Tag Manager)? Please let me know.

    Julius Fedorovicius
    • Dec 10 2021
    • Reply

    Ask a developer to do that in the code

Zhihong
  • Apr 8 2022
  • Reply

Hello, when I have a one page application with artificial pageviews sent by gtm.js', the second and on gtm.js' have a similar message: "Not tags were evaluated" so it's completely useless to trigger tags. This buffles me since gtm.js is an event key that is sent to datalayer. Could you please enlighten me on this problem?

    Julius Fedorovicius
    • Apr 13 2022
    • Reply

    Tags fire only on the first gtm.js event. It is a special event that works in a different way. Use any other event for other virtual pageviews, e.g. virtual_pageview instead of gtm.js

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *


 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • Conversion rate in Google Analytics 4
  • Google Tag Manager Data Layer Explained
  • Cross-domain tracking in Google Analytics 4
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings