{"id":6662,"date":"2024-06-14T06:23:55","date_gmt":"2024-06-14T06:23:55","guid":{"rendered":"https:\/\/lite14.net\/blog\/?p=6662"},"modified":"2024-06-14T06:23:55","modified_gmt":"2024-06-14T06:23:55","slug":"how-to-use-css-selectors-to-create-triggers-in-google-tag-manager","status":"publish","type":"post","link":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/","title":{"rendered":"How to use CSS Selectors to Create Triggers in Google Tag Manager"},"content":{"rendered":"<div class=\"flex-1 overflow-hidden\">\n<div class=\"react-scroll-to-bottom--css-gynrq-79elbk h-full\">\n<div class=\"react-scroll-to-bottom--css-gynrq-1n7m0yu\">\n<div class=\"flex flex-col text-sm md:pb-9\">\n<div class=\"w-full text-token-text-primary\" dir=\"auto\" data-testid=\"conversation-turn-71\" data-scroll-anchor=\"true\">\n<div class=\"py-2 juice:py-[18px] px-3 text-base md:px-4 m-auto md:px-5 lg:px-1 xl:px-5\">\n<div class=\"mx-auto flex flex-1 gap-3 text-base juice:gap-4 juice:md:gap-5 juice:lg:gap-6 md:max-w-3xl lg:max-w-[40rem] xl:max-w-[48rem]\">\n<div class=\"group\/conversation-turn relative flex w-full min-w-0 flex-col agent-turn\">\n<div class=\"flex-col gap-1 md:gap-3\">\n<div class=\"flex flex-grow flex-col max-w-full\">\n<div class=\"min-h-[20px] text-message flex flex-col items-start whitespace-pre-wrap break-words [.text-message+&amp;]:mt-5 juice:w-full juice:items-end overflow-x-auto gap-2\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"1093c5eb-e8e8-44a1-a753-3b962dd379fe\">\n<div class=\"flex w-full flex-col gap-1 juice:empty:hidden juice:first:pt-[3px]\">\n<div class=\"markdown prose w-full break-words dark:prose-invert light\">\n<p>Using CSS selectors to create triggers in Google Tag Manager (GTM) allows you to target specific elements on your website for tracking interactions such as clicks. This method is flexible and powerful, enabling you to define triggers based on HTML element attributes like IDs, classes, and element types. Here\u2019s a step-by-step guide on how to use CSS selectors to create triggers in GTM.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#_1_Set_Up_Google_Tag_Manager\" >\u00a01. Set Up Google Tag Manager<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#_2_Identify_the_Elements_to_Track\" >\u00a02. Identify the Elements to Track<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#_3_Enable_Click_Variables\" >\u00a03. Enable Click Variables<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#_4_Create_a_Trigger_Using_CSS_Selectors\" >\u00a04. Create a Trigger Using CSS Selectors<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#_5_Create_a_Tag_to_Track_the_Triggered_Event\" >\u00a05. Create a Tag to Track the Triggered Event<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#_6_Test_the_Setup\" >\u00a06. Test the Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#_7_Publish_the_Changes\" >\u00a07. Publish the Changes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#Example_Scenario_Tracking_Clicks_on_a_Download_Button\" >Example Scenario: Tracking Clicks on a Download Button<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"_1_Set_Up_Google_Tag_Manager\"><\/span>\u00a01. Set Up Google Tag Manager<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Create a GTM Account and Container<\/strong>:\n<ul>\n<li>If you haven\u2019t already, create a GTM account and set up a container for your website.<\/li>\n<li>Add the GTM container code snippet to your website\u2019s HTML.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_2_Identify_the_Elements_to_Track\"><\/span>\u00a02. Identify the Elements to Track<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Inspect the Element<\/strong>:\n<ul>\n<li>Use your browser\u2019s developer tools (usually accessed by right-clicking on the page and selecting &#8220;Inspect&#8221; or &#8220;Inspect Element&#8221;) to identify the HTML structure of the element you want to track.<\/li>\n<li>Note the CSS selector for the element. For example, if you want to track clicks on a button with the ID <code>subscribe-button<\/code>, the CSS selector is <code>#subscribe-button<\/code>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_3_Enable_Click_Variables\"><\/span>\u00a03. Enable Click Variables<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Enable Click Variables in GTM<\/strong>:\n<ul>\n<li>Go to the &#8220;Variables&#8221; section in GTM.<\/li>\n<li>Click on &#8220;Configure&#8221; in the &#8220;Built-In Variables&#8221; section.<\/li>\n<li>Check the boxes for click-related variables such as &#8220;Click URL&#8221;, &#8220;Click Text&#8221;, &#8220;Click ID&#8221;, etc.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_4_Create_a_Trigger_Using_CSS_Selectors\"><\/span>\u00a04. Create a Trigger Using CSS Selectors<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Create a New Trigger in GTM<\/strong>:\n<ul>\n<li>Go to &#8220;Triggers&#8221; &gt; &#8220;New&#8221; &gt; &#8220;Trigger Configuration&#8221;.<\/li>\n<li>Select &#8220;Click &#8211; All Elements&#8221; or &#8220;Click &#8211; Just Links&#8221;, depending on whether you want to track all clicks or only clicks on links.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Configure the Trigger<\/strong>:\n<ul>\n<li>Under &#8220;This trigger fires on&#8221;, select &#8220;Some Clicks&#8221;.<\/li>\n<li>Click on &#8220;Choose Built-In Variable&#8221; and select a click variable, such as &#8220;Click ID&#8221;.<\/li>\n<li>Choose the appropriate matching criteria (e.g., &#8220;Click ID&#8221; equals <code>subscribe-button<\/code>). Alternatively, you can use &#8220;Click Element&#8221; matches CSS selector for more complex targeting:\n<ul>\n<li>Select &#8220;Click Element&#8221; \u2192 &#8220;matches CSS selector&#8221;.<\/li>\n<li>Enter the CSS selector for the element (e.g., <code>#subscribe-button<\/code> for an element with the ID <code>subscribe-button<\/code>).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Name and Save the Trigger<\/strong>:\n<ul>\n<li>Name the trigger descriptively, such as &#8220;Subscribe Button Click Trigger&#8221;.<\/li>\n<li>Save the trigger.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_5_Create_a_Tag_to_Track_the_Triggered_Event\"><\/span>\u00a05. Create a Tag to Track the Triggered Event<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Create a New Tag in GTM<\/strong>:\n<ul>\n<li>Go to &#8220;Tags&#8221; &gt; &#8220;New&#8221; &gt; &#8220;Tag Configuration&#8221;.<\/li>\n<li>Select &#8220;Google Analytics: Universal Analytics&#8221; or any other tag type you are using.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Configure the Event Tag<\/strong>:\n<ul>\n<li>Choose &#8220;Event&#8221; as the track type.<\/li>\n<li>Configure the event parameters:\n<ul>\n<li>Category: Button Click<\/li>\n<li>Action: Click<\/li>\n<li>Label: Subscribe Button<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Set the Trigger for the Tag<\/strong>:\n<ul>\n<li>Under &#8220;Triggering&#8221;, select the trigger created in Step 4.<\/li>\n<li>Name the tag (e.g., &#8220;GA &#8211; Event &#8211; Subscribe Button Click&#8221;) and save it.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_6_Test_the_Setup\"><\/span>\u00a06. Test the Setup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Use GTM Preview Mode<\/strong>:\n<ul>\n<li>Click on &#8220;Preview&#8221; in the GTM interface to enter preview mode.<\/li>\n<li>Navigate to your website and interact with the element (e.g., click the subscribe button).<\/li>\n<li>Check the GTM preview pane to ensure the tag is firing correctly.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Verify in Google Analytics<\/strong>:\n<ul>\n<li>Go to GA &gt; &#8220;Real-Time&#8221; &gt; &#8220;Events&#8221; to see if the click events are being tracked.<\/li>\n<li>Verify that the events are being recorded with the correct category, action, and label.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_7_Publish_the_Changes\"><\/span>\u00a07. Publish the Changes<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Publish the GTM Container<\/strong>:\n<ul>\n<li>Once you have tested and confirmed that the click tracking is working correctly, publish the GTM container to make the changes live:\n<ul>\n<li>Click on &#8220;Submit&#8221; in GTM.<\/li>\n<li>Add a version name and description for the changes.<\/li>\n<li>Click &#8220;Publish&#8221;.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Example_Scenario_Tracking_Clicks_on_a_Download_Button\"><\/span>Example Scenario: Tracking Clicks on a Download Button<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Objective<\/strong>: Track clicks on a download button with the class <code>download-btn<\/code>.<\/p>\n<ol>\n<li><strong>Set Up GTM<\/strong>:\n<ul>\n<li>Ensure the GTM container code snippet is implemented on your website.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Identify the Element<\/strong>:\n<ul>\n<li>Use browser developer tools to inspect the button.<\/li>\n<li>Note the CSS selector <code>.download-btn<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Enable Click Variables<\/strong>:\n<ul>\n<li>Enable click variables in GTM.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Create Trigger<\/strong>:\n<ul>\n<li>Create a new trigger for &#8220;Click &#8211; All Elements&#8221;.<\/li>\n<li>Configure it to fire on elements matching the CSS selector <code>.download-btn<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Create Tag<\/strong>:\n<ul>\n<li>Create a GA event tag with:\n<ul>\n<li>Category: Button Click<\/li>\n<li>Action: Click<\/li>\n<li>Label: Download Button<\/li>\n<\/ul>\n<\/li>\n<li>Set the trigger to the &#8220;Download Button Click Trigger&#8221;.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Test and Publish<\/strong>:\n<ul>\n<li>Use GTM preview mode to test by clicking the download button.<\/li>\n<li>Verify the events in GA real-time reports.<\/li>\n<li>Publish the GTM container once confirmed.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Using CSS selectors to create triggers in Google Tag Manager is a powerful way to track specific user interactions on your website. By identifying the right elements, enabling click variables, creating targeted triggers, and setting up event tags, you can effectively monitor and analyze user behavior. This method provides flexibility and precision in your tracking setup, helping you gain deeper insights into how users engage .<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"mt-1 flex gap-3 empty:hidden juice:-ml-3\">\n<div class=\"items-center justify-start rounded-xl p-1 flex\">\n<div class=\"flex items-center\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Using CSS selectors to create triggers in Google Tag Manager (GTM) allows you to target specific elements on your website for tracking interactions such as&#8230;<\/p>\n","protected":false},"author":210,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[270],"tags":[],"class_list":["post-6662","post","type-post","status-publish","format-standard","hentry","category-digital-marketing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use CSS Selectors to Create Triggers in Google Tag Manager - Lite14 Tools &amp; Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use CSS Selectors to Create Triggers in Google Tag Manager - Lite14 Tools &amp; Blog\" \/>\n<meta property=\"og:description\" content=\"Using CSS selectors to create triggers in Google Tag Manager (GTM) allows you to target specific elements on your website for tracking interactions such as...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"Lite14 Tools &amp; Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-14T06:23:55+00:00\" \/>\n<meta name=\"author\" content=\"admin3\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin3\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/\"},\"author\":{\"name\":\"admin3\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81\"},\"headline\":\"How to use CSS Selectors to Create Triggers in Google Tag Manager\",\"datePublished\":\"2024-06-14T06:23:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/\"},\"wordCount\":751,\"publisher\":{\"@id\":\"https:\/\/lite14.net\/blog\/#organization\"},\"articleSection\":[\"Digital Marketing\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/\",\"url\":\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/\",\"name\":\"How to use CSS Selectors to Create Triggers in Google Tag Manager - Lite14 Tools &amp; Blog\",\"isPartOf\":{\"@id\":\"https:\/\/lite14.net\/blog\/#website\"},\"datePublished\":\"2024-06-14T06:23:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lite14.net\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use CSS Selectors to Create Triggers in Google Tag Manager\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/lite14.net\/blog\/#website\",\"url\":\"https:\/\/lite14.net\/blog\/\",\"name\":\"Lite14 Tools &amp; Blog\",\"description\":\"Email Marketing Tools &amp; Digital Marketing Updates\",\"publisher\":{\"@id\":\"https:\/\/lite14.net\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/lite14.net\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/lite14.net\/blog\/#organization\",\"name\":\"Lite14 Tools &amp; Blog\",\"url\":\"https:\/\/lite14.net\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png\",\"contentUrl\":\"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png\",\"width\":191,\"height\":178,\"caption\":\"Lite14 Tools &amp; Blog\"},\"image\":{\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81\",\"name\":\"admin3\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g\",\"caption\":\"admin3\"},\"url\":\"https:\/\/lite14.net\/blog\/author\/adeyemoemmanuel001\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use CSS Selectors to Create Triggers in Google Tag Manager - Lite14 Tools &amp; Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/","og_locale":"en_US","og_type":"article","og_title":"How to use CSS Selectors to Create Triggers in Google Tag Manager - Lite14 Tools &amp; Blog","og_description":"Using CSS selectors to create triggers in Google Tag Manager (GTM) allows you to target specific elements on your website for tracking interactions such as...","og_url":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/","og_site_name":"Lite14 Tools &amp; Blog","article_published_time":"2024-06-14T06:23:55+00:00","author":"admin3","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin3","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#article","isPartOf":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/"},"author":{"name":"admin3","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81"},"headline":"How to use CSS Selectors to Create Triggers in Google Tag Manager","datePublished":"2024-06-14T06:23:55+00:00","mainEntityOfPage":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/"},"wordCount":751,"publisher":{"@id":"https:\/\/lite14.net\/blog\/#organization"},"articleSection":["Digital Marketing"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/","url":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/","name":"How to use CSS Selectors to Create Triggers in Google Tag Manager - Lite14 Tools &amp; Blog","isPartOf":{"@id":"https:\/\/lite14.net\/blog\/#website"},"datePublished":"2024-06-14T06:23:55+00:00","breadcrumb":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/lite14.net\/blog\/2024\/06\/14\/how-to-use-css-selectors-to-create-triggers-in-google-tag-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lite14.net\/blog\/"},{"@type":"ListItem","position":2,"name":"How to use CSS Selectors to Create Triggers in Google Tag Manager"}]},{"@type":"WebSite","@id":"https:\/\/lite14.net\/blog\/#website","url":"https:\/\/lite14.net\/blog\/","name":"Lite14 Tools &amp; Blog","description":"Email Marketing Tools &amp; Digital Marketing Updates","publisher":{"@id":"https:\/\/lite14.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lite14.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/lite14.net\/blog\/#organization","name":"Lite14 Tools &amp; Blog","url":"https:\/\/lite14.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png","contentUrl":"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png","width":191,"height":178,"caption":"Lite14 Tools &amp; Blog"},"image":{"@id":"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81","name":"admin3","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g","caption":"admin3"},"url":"https:\/\/lite14.net\/blog\/author\/adeyemoemmanuel001\/"}]}},"_links":{"self":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/users\/210"}],"replies":[{"embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/comments?post=6662"}],"version-history":[{"count":2,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6662\/revisions"}],"predecessor-version":[{"id":6677,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6662\/revisions\/6677"}],"wp:attachment":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/media?parent=6662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/categories?post=6662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/tags?post=6662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}