How to know if a js code fired using google tag manager?

by ervin.williamson , in category: SEO Tools , 7 months ago

How to know if a js code fired using google tag manager?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by domenico.weimann , 7 months ago


To confirm if a JavaScript code fired using Google Tag Manager, you can follow these steps:

  1. Open the website or webpage where you have implemented the Google Tag Manager container.
  2. Right-click on the page and select "Inspect" or "Inspect Element" to open the browser's developer console.
  3. In the developer console, navigate to the "Console" tab.
  4. In the Google Tag Manager container, there might be multiple tags or triggers set up. To check if a specific code fired, you need to know the trigger condition or event associated with it.
  5. Trigger the specific event or action that should fire the code you want to check. For example, if the code should be fired when clicking on a specific button, click on that button.
  6. In the developer console's "Console" tab, monitor any outputs or logging related to the code you are testing. If the code fired successfully, you should see log messages or output related to that code. Alternatively, you might see other signs that indicate the code's execution, like network requests or changes in specific elements on the page.

Note: If the code you are testing involves sending data to Google Analytics or other analytics tools, you can also check the analytics dashboard to verify if the data was received.