Free!

{eac}SimpleGTM Extension

Original price was: $35.00.Current price is: $0.00.

{eac}eacSimpleGTM installs and configures the Google Tag Manager (GTM) or Google Analytics (GA4) script with optional tracking events.

Also available from the WordPress Plugin Directory, or from your WordPress Dashboard, go to ‘Plugins‘ »  ‘Add New‘ and search for ‘EarthAsylum‘.

Description

{eac}Doojigger SimpleGTM is an {eac}Doojigger 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 WooCommerce, e-commerce actions.

{eac}SimpleGTM 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.

The selected consent attributes are set to 'granted' 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's Introduction to user consent. This is typically not necessary and not recommended when using a CMP.

If no consent attributes are selected than the "consent default" configuration is not sent, otherwise, unselected attributes are set to "denied".

Default consent settings passed when initializing GTM or GA4:

ad_storage  
analytics_storage   
ad_user_data    
ad_personalization  
functionality_storage   
personalization_storage 
security_storage    
  • URL passthrough

When consent attributes ad_storage and/or analytics_storage are set to denied, pass information about ad clicks or analytics through URL parameters.

  • Allow Google Signals

Allows session data that Google associates with users who have signed in to their Google accounts, and who have turned on Ads Personalization.

  • Redact Ads Data

When ads_data_redaction is true and ad_storage is denied, 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.

Send Event Tags

When to send events to the browser. In Page Footer sends events in the page footer as the page loads. On Document Load sends events as soon as the document is loaded but before the browser renders the page. On Window Ready waits for the page to be rendered (this may be helpful with late-loading CMP plugins).

Events To Track

Custom events are simple events with limited data that use Google's recommended names and attributes

See Recommended events: Tag Manager Google Tag

  • Page Views

    • page_view {page_title, page_location, page_referrer, user_agent, page_encoding, language}
  • Site Search

    • search {search_term}
  • View Content (category, tag, term)

    • select_content {content_type, content_id}
  • View Archive (archive, author, date)

    • select_content {content_type, content_id}
  • E-Commerce

    • view_item_list {item_list_id, item_list_name}
    • view_item {currency, value, items}
    • view_cart {currency, value, items}
    • begin_checkout {currency, value, coupon, discount, items}
    • purchase {transaction_id, currency, value, coupon, discount, shipping, tax, items}
    • items = {item_id, item_name, price, discount, quantity, item_variant, item_category}
  • Cart Actions

    • select_promotion {promotion_id, promotion_name}
    • add_to_cart {currency, value, items}
    • remove_from_cart {currency, value, items}
    • update_cart_item {currency, value, items}
    • items = {item_id, item_name, price, discount, quantity, item_variant, item_category}
  • Enhanced Conversions

    • Enhanced Conversions for web 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.
  • Page Not Found

    • page_not_found {request_uri}

* Session storage is used when cart actions are triggered. This requires enabling/setting {eac}Doojigger → Session Extension.

* Page Views are typically included in your tag container, other tags & triggers may need to be configured in Google Tag Manager.

* If enabled, WP Consent API may block events (when 'statistics-anonymous' consent is denied) and Enhanced Conversions (when 'statistics' consent is denied).

Actions and Filters

  • eacDoojigger_google_tag_event - Action to add a custom event.

    • do_action( 'eacDoojigger_google_tag_event( 'event_name', [...event parameters...] ) );
  • eacDoojigger_google_tag_data - Action to add data to the Google tag data layer.

    • do_action( 'eacDoojigger_google_tag_data( 'data_name', [...data array...] ) );
  • eacDoojigger_google_ecommerce_event - Action to add an ecommerce event.

    • do_action( 'eacDoojigger_google_ecommerce_event( 'event_name', [...event parameters...] ) );
  • eacDoojigger_google_tag_consent - Filter the consent array.

    • add_filter( 'eacDoojigger_google_tag_consent', function($consent) {...} );
    • $consent is an array of [ $option => 'granted|denied' ]
  • eacDoojigger_google_tag_configuration - Filter the configuration array.

    • add_filter( 'eacDoojigger_google_tag_configuration', function($config) {...} );
    • $config is an array of [ $option => bool|null ]
  • eacDoojigger_google_tag_events - Filter the events array prior to output.

    • add_filter( 'eacDoojigger_google_tag_events', function($events) {...} );
    • $events is an array of [ $event => [$attributes] ]
    • $event is an array [type,event_name] where type is 'set', 'data', 'gtm', 'gtag', or 'ecommerce'.

3rd Party Service

By loading the Google Tag Manager (GTM) or Google Analytics (GA4) script, {eac}SimpleGTM causes data collected from your website and from your users to be transmitted to Google.

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.

Privacy Disclosures Policy

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.

Additional information

You may also like…