{"id":406279,"date":"2024-08-16T08:00:00","date_gmt":"2024-08-16T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/eacsimplegtm\/"},"modified":"2025-07-22T06:27:00","modified_gmt":"2025-07-22T06:27:00","slug":"eacsimplegtm","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/eacsimplegtm\/","title":{"rendered":"{eac}Doojigger Simple GTM Extension for WordPress"},"content":{"rendered":"<p><strong>{eac}Doojigger SimpleGTM<\/strong> is an <a href=\"https:\/\/eacDoojigger.earthasylum.com\/\" rel=\"nofollow ugc\">{eac}Doojigger<\/a> extension that installs the Google Tag Manager (GTM) or Google Analytics (GA4) script, sets default consent options, and enables tracking of page views, site searches, content views, and, when using <a href=\"https:\/\/woocommerce.com\/\" rel=\"nofollow ugc\">WooCommerce<\/a>, e-commerce actions.<\/p>\n<p><em>{eac}SimpleGTM<\/em> is a very light-weight and simple extension that uses PHP to add small JavaScript snippets to your web pages for configuring and tracking with Google Analytics. Many web site owners will find this more than sufficient over more complicated (and over-bearing) alternatives.<\/p>\n<h4>Default Consent (advanced)<\/h4>\n<p>The selected consent attributes are set to \u2018granted\u2019 before other tags are loaded or actions taken. This does not make your site GDPR\/CCPA compliant and should not be used in place of a Consent Management Platform (CMP). See Google\u2019s <a href=\"https:\/\/support.google.com\/analytics\/answer\/12329599\" rel=\"nofollow ugc\">Introduction to user consent<\/a>. This is typically not necessary and not recommended when using a CMP.<\/p>\n<p>If no consent attributes are selected than the \u201cconsent default\u201d configuration is not sent, otherwise, unselected attributes are set to \u201cdenied\u201d.<\/p>\n<p>Default consent settings passed when initializing GTM or GA4:<\/p>\n<pre><code>ad_storage  \nanalytics_storage   \nad_user_data    \nad_personalization  \nfunctionality_storage   \npersonalization_storage \nsecurity_storage    \n<\/code><\/pre>\n<h4>Consent Options (advanced)<\/h4>\n<ul>\n<li>URL passthrough<\/li>\n<\/ul>\n<p>When consent attributes <code>ad_storage<\/code> and\/or <code>analytics_storage<\/code> are set to <code>denied<\/code>, pass information about ad clicks or analytics through URL parameters.<\/p>\n<ul>\n<li>Allow Google Signals<\/li>\n<\/ul>\n<p>Allows session data that Google associates with users who have signed in to their Google accounts, and who have turned on Ads Personalization.<\/p>\n<ul>\n<li>Redact Ads Data<\/li>\n<\/ul>\n<p>When ads_data_redaction is true and <code>ad_storage<\/code> is <code>denied<\/code>, ad click identifiers sent in network requests by Google Ads and Floodlight tags will be redacted. Network requests will also be sent through a cookieless domain.<\/p>\n<h4>Send Event Tags<\/h4>\n<p>When to send events to the browser. <em>In Page Footer<\/em> sends events in the page footer as the page loads.<br \/>\n<em>On Document Load<\/em> sends events as soon as the document is loaded but before the browser renders the page.<br \/>\n<em>On Window Ready<\/em> waits for the page to be rendered (this may be helpful with late-loading CMP plugins).<\/p>\n<h4>Events To Track<\/h4>\n<p>Custom events are simple events with limited data that use Google\u2019s recommended names and attributes<\/p>\n<p>See Recommended events:<br \/>\n<a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/ga4\/reference\/events?client_type=gtm\" rel=\"nofollow ugc\">Tag Manager<\/a><br \/>\n<a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/ga4\/reference\/events?client_type=gtag\" rel=\"nofollow ugc\">Google Tag<\/a><\/p>\n<ul>\n<li>\n<p>Page Views<\/p>\n<ul>\n<li><code>page_view {page_title, page_location, page_referrer, user_agent, page_encoding, language}<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Site Search<\/p>\n<ul>\n<li><code>search {search_term}<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>View Content (category, tag, term)<\/p>\n<ul>\n<li><code>select_content {content_type, content_id}<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>View Archive (archive, author, date)<\/p>\n<ul>\n<li><code>select_content {content_type, content_id}<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>E-Commerce<\/p>\n<ul>\n<li><code>view_item_list {item_list_id, item_list_name}<\/code><\/li>\n<li><code>view_item {currency, value, items}<\/code><\/li>\n<li><code>view_cart {currency, value, items}<\/code><\/li>\n<li><code>begin_checkout {currency, value, coupon, discount, items}<\/code><\/li>\n<li><code>purchase {transaction_id, currency, value, coupon, discount, shipping, tax, items}<\/code><\/li>\n<li><em>items = {item_id, item_name, price, discount, quantity, item_variant, item_category}<\/em><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Cart Actions<\/p>\n<ul>\n<li><code>select_promotion {promotion_id, promotion_name}<\/code><\/li>\n<li><code>add_to_cart {currency, value, items}<\/code><\/li>\n<li><code>remove_from_cart {currency, value, items}<\/code><\/li>\n<li><code>update_cart_item {currency, value, items}<\/code><\/li>\n<li><em>items = {item_id, item_name, price, discount, quantity, item_variant, item_category}<\/em><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Enhanced Conversions<\/p>\n<ul>\n<li><a href=\"https:\/\/support.google.com\/google-ads\/answer\/13258081\" rel=\"nofollow ugc\">Enhanced Conversions for web<\/a> is a feature that can improve the accuracy of your conversion measurement. It supplements your existing conversion tags by sending hashed first-party conversion data from your website in a privacy safe way.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Page Not Found<\/p>\n<ul>\n<li><code>page_not_found {request_uri}<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<blockquote>\n<p>* Session storage is used when cart actions are triggered. This requires enabling\/setting <em>{eac}Doojigger <span aria-hidden=\"true\" class=\"wp-exclude-emoji\">\u2192<\/span> Session Extension<\/em>.<\/p>\n<p>* Page Views are typically included in your tag container, other tags & triggers may need to be configured in<br \/>\n  <a href=\"https:\/\/tagmanager.google.com\/\" rel=\"nofollow ugc\">Google Tag Manager<\/a>.<\/p>\n<p>* If enabled, <a href=\"https:\/\/wordpress.org\/plugins\/wp-consent-api\/\" rel=\"ugc\">WP Consent API<\/a> may block events (when \u2018statistics-anonymous\u2019 consent is denied) and Enhanced Conversions (when \u2018statistics\u2019 consent is denied).<\/p>\n<\/blockquote>\n<h4>Actions and Filters<\/h4>\n<ul>\n<li>\n<p>eacDoojigger_google_tag_event   \u2013 Action to add a custom event.<\/p>\n<ul>\n<li><code>do_action( 'eacDoojigger_google_tag_event( 'event_name', [...event parameters...] ) );<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>eacDoojigger_google_tag_data    \u2013 Action to add data to the Google tag data layer.<\/p>\n<ul>\n<li><code>do_action( 'eacDoojigger_google_tag_data( 'data_name', [...data array...] ) );<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>eacDoojigger_google_ecommerce_event \u2013 Action to add an ecommerce event.<\/p>\n<ul>\n<li><code>do_action( 'eacDoojigger_google_ecommerce_event( 'event_name', [...event parameters...] ) );<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>eacDoojigger_google_tag_consent \u2013 Filter the consent array.<\/p>\n<ul>\n<li><code>add_filter( 'eacDoojigger_google_tag_consent', function($consent) {...} );<\/code><\/li>\n<li><code>$consent<\/code> is an array of <code>[ $option => 'granted|denied' ]<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>eacDoojigger_google_tag_configuration \u2013 Filter the configuration array.<\/p>\n<ul>\n<li><code>add_filter( 'eacDoojigger_google_tag_configuration', function($config) {...} );<\/code><\/li>\n<li><code>$config<\/code> is an array of <code>[ $option => bool|null ]<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>eacDoojigger_google_tag_events  \u2013 Filter the events array prior to output.<\/p>\n<ul>\n<li><code>add_filter( 'eacDoojigger_google_tag_events', function($events) {...} );<\/code><\/li>\n<li><code>$events<\/code> is an array of <code>[ $event => [$attributes] ]<\/code><\/li>\n<li><code>$event<\/code> is an array <code>[type,event_name]<\/code> where type is \u2018set\u2019, \u2018data\u2019, \u2018gtm\u2019, \u2018gtag\u2019, or \u2018ecommerce\u2019.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>3rd Party Service<\/h4>\n<p>By loading the Google Tag Manager (GTM) or Google Analytics (GA4) script, {eac}SimpleGTM causes data collected from your website <em>and from your users<\/em> to be transmitted to Google.<\/p>\n<ul>\n<li><a href=\"https:\/\/support.google.com\/analytics\/answer\/12159447?hl=en\" rel=\"nofollow ugc\">How Google Analytics works<\/a><\/li>\n<li><a href=\"https:\/\/support.google.com\/tagmanager\/answer\/6102821?hl=en\" rel=\"nofollow ugc\">Introduction to Google Tag Manager<\/a><\/li>\n<\/ul>\n<p><em>You are responsible for the proper configuration of your Google Analytics property and\/or Google Tag Manager settings as well as proper notification and consent from your users.<\/em><\/p>\n<ul>\n<li><a href=\"https:\/\/support.google.com\/analytics\/answer\/12329599\" rel=\"nofollow ugc\">Introduction to user consent<\/a><\/li>\n<\/ul>\n<h4>Privacy Disclosures Policy<\/h4>\n<p>When you use Google Analytics on your site or application, you must disclose the use of Google Analytics and how it collects and processes data.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.google.com\/policies\/privacy\/partners\/\" rel=\"nofollow ugc\">Google\u2019s Privacy & Terms<\/a><\/li>\n<li><a href=\"https:\/\/support.google.com\/analytics\/answer\/6004245\" rel=\"nofollow ugc\">Safeguarding your data<\/a><\/li>\n<\/ul>\n<h4>Additional Information<\/h4>\n<ul>\n<li>\n<p>{eac}SimpleGTM is an extension plugin to and requires installation and registration of <a href=\"https:\/\/eacDoojigger.earthasylum.com\/\" rel=\"nofollow ugc\">{eac}Doojigger<\/a>.<\/p>\n<\/li>\n<li>\n<p>Visit the <a href=\"https:\/\/github.com\/EarthAsylum\" rel=\"nofollow ugc\">EarthAsylum GitHub Repository<\/a> or the <a href=\"https:\/\/eacdoojigger.earthasylum.com\/\" rel=\"nofollow ugc\">{eac}Doojigger Web Site<\/a> for all plugins, extensions, and documentation.<\/p>\n<\/li>\n<\/ul>\n<h3>Copyright<\/h3>\n<h4>Copyright \u00a9 2025, EarthAsylum Consulting, distributed under the terms of the GNU GPL.<\/h4>\n<p>This program is free software: you can redistribute it and\/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<\/p>\n<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<\/p>\n<p>You should receive a copy of the GNU General Public License along with this program. If not, see <a href=\"https:\/\/www.gnu.org\/licenses\/\" rel=\"nofollow ugc\">https:\/\/www.gnu.org\/licenses\/<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>{eac}eacSimpleGTM installs and configures the Google Tag Manager (GTM) or Google Analytics (GA4) script with optional tracking events.<\/p>\n","protected":false},"author":65,"featured_media":406280,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"{eac}Doojigger Simple GTM Extension for WordPress - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"{eac}eacSimpleGTM installs and configures the Google Tag Manager (GTM) or Google Analytics (GA4) script with optional tracking events."},"footnotes":""},"categories":[1],"tags":[457,18693,506,1499,136],"class_list":["post-406279","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-analytics","tag-eacdoojigger","tag-google-analytics","tag-google-tag-manager","tag-tracking"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/406279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=406279"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/406279\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/406280"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=406279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=406279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=406279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}