1. Home
  2. /
  3. Advanced Google Analytics 4 GTM Setup Bundle
  4. /
  5. GTM & GA4 Setup Bundle Features

GTM & GA4 Setup Bundle Features

Page & WordPress Metadata

Every PageView and all other GA4 events are enriched by:

  • Page Metadata
  • WordPress Metadata

See the detailed description of GA4 Custom Dimensions below.

Description of GA4 Custom Dimensions

Page Metadata Custom Dimensions

  • w_path – Page Path without parameters (i.e. part after ? is removed if present)
  • w_path_1, w_path_2, w_path_3, w_path_4, w_path_5 – parts of URL that can be used for Content Grouping based on page URL Structure
    • e.g. for path /store/books/fiction values will be
      • w_path_1 = store
      • w_path_2 = books
      • w_path_3 = fiction

WordPress Metadata Custom Dimensions

If you use excellent WordPress plugin GTM4WP your dataLayer is enriched by WordPress metadata like Post Category, Post Type, Post Author, Post Date and much more.

Dimensions related to specific events

Different events listed below used event parameters that are pushed to Google Analytics as Custom Dimension.

You have to create these Custom Dimension in your Google Analytics.

  • w_click_section – Section of a page where Click happened.
  • w_click_text – Text of a clicked link or an element.
  • w_click_type – Specific links type (e.g. tel, mailto)
  • w_click_url – URL of a clicked link.
  • w_event_category – Custom event Category
  • w_event_action – Custom event Action
  • w_event_label – Custom event Label
  • w_search_query – Internal Search Query capture based on GTM setup.

List of custom dimensions

How to setup custom dimensions? Read here.



GA4 Link Click Tracking

External Link Click

When a user clicks to an outgoing link, i.e. link to another website.

Event w_click_external_link dimensions:

  • w_click_section
  • w_click_type
  • w_click_url
  • w_click_text

Internal Link Click

When a user clicks to an internal link, i.e. link on the tracked website.

Event w_click_internal_link dimensions:

  • w_click_section
  • w_click_type
  • w_click_url
  • w_click_text

Button Link Clicks

When a user clicks to a button.

What is supposed to be a Button (what HTML elements):

  • element button
  • element input[type=submit]
  • link a[role=button]
  • link with classes matching this regular expression ((^| )btn|-btn|-button|_button)( |$) = it covers links styled as button for Bootstrap and most of (not just WordPress) website templates

You can easily update these conditions.

Event w_click_button dimensions:

  • w_click_section
  • w_click_type
  • w_click_url
  • w_click_text

Contact Link Click

When a user clicks to email (mailto), phone (tel), Skype, Whatsapp, SMS (sms) or geolocation (geo) links.

Event w_click_contact dimensions:

  • w_click_section
  • w_click_type
  • w_click_url
  • w_click_text

Download Link Click

When a user clicks to a file. It works for all links to files with one of these file extensions:

3g2p, 7z, accdb, ai, aif, apkp, asf, asx, avi, bat, bin, bmp, cab, cbr, cgi, cpl, crx, csv, cue, cur, dat, dbf, dds, deb, deskthemepack, dll, dmg, dmp, docx, doc, drv, dwg, dxf, eps, exe, flv, fnt, fon, gadget, gbr, ged, gif, gpx, gz, icns, ico, ics, iff, indd, iso, jar, jpeg, jpg, keychain, key, kml, kmz, lnk, log, m3u, m4a, m4v, mdb, mdf, mid, mov, mp3, mp4, m4g, msg, msi, odt, otf, pages, part, pct, pdb, pdf, pif, pkg, plugin, png, pps, pptx, ppt, ps, psd, pspimage, ra, rar, rm, rpm, rtf, sdf, sitx, sql, srt, svg, swf, sys, tar, tar.gz, tex, tga, thm, tiff, tif, toast, torrent, ttf, txt, vb, vcd, vcf, vob, wav, wma, wm, wpd, wps, wsf, xlsx, xml, yuv, zip, zipx

Event w_click_download dimensions:

  • w_click_section
  • w_click_type
  • w_click_url
  • w_click_text

Custom Click Tracking

You can use Custom Link tracking and give specific links their own labels by adding HTML data attributes to the HTML element you want to track clicks on.

See these examples in action on the Demo Website.

Do you want to track click to specific link as named event? Just add some HTML attributes (all with data-was-) that match Google Analytics event category (data-was-ec) and event action (data-was-ea). Link URL will be automatically recorded as event label.

<a href="#buttonA" data-was-type="link"  data-was-ec="Clicks" data-was-ea="Buttons" class="btn btn-lg btn-success">Button A</a>

Do you want to track click to the specific page element as named event? Just add some HTML attributes (all with data-was-) that match Google Analytics event category (data-was-ec), event action (data-was-ea) and event label (data-was-el).

<ul class="nav nav-tabs color3" role="tablist">
    <li role="presentation" class="active"><a href="#desc" aria-controls="desc" role="tab" data-toggle="tab" data-was-type="link" data-was-ec="Clicks" data-was-ea="Tabs" data-was-el="Description"  >Decription</a></li>
    <li role="presentation"><a href="#techspecs" aria-controls="techspecs" role="tab" data-toggle="tab" data-was-type="link" data-was-ec="Clicks" data-was-ea="Tabs" data-was-el="Tech Specs" >Tech Specs</a></li>
    <li role="presentation"><a href="#photos" aria-controls="photos" role="tab" data-toggle="tab" data-was-type="link" data-was-ec="Clicks" data-was-ea="Tabs" data-was-el="Photos" >Photos</a></li>
    <li role="presentation"><a href="#reviews" aria-controls="reviews" role="tab" data-toggle="tab" data-was-type="link" data-was-ec="Clicks" data-was-ea="Tabs" data-was-el="Reviews" >Reviews</a></li>
  </ul>

See these examples in action on the Demo Website.

Event w_click_custom dimensions:

  • w_click_section
  • w_click_type (only for Link Clicks)
  • w_click_url (only for Link Clicks)
  • w_click_text
  • w_event_category
  • w_event_action
  • w_event_label
  • Metric value

GA4 Page Not Found Tracking

When a Page Not Found or Error 404 is shown.

This event is based on the page title.

You can easily change the condition to match your error page title.

Event w_not_found dimensions:

  • w_event_category = Event name
  • w_event_action = Traffic source type is one of these
    • direct = no referring website
    • internal = user came from your website
    • external = user came from other websites or search engine
  • w_event_label = URL of the page

GA4 Internal Search Tracking

Tracked when internal search is used and the query string is in the URL.

Works with these query parameters: q, s, search, query, keyword

If you website uses unusual query parameters, you can easily change the list of parameters.

Event w_search dimensions:

  • w_search_query = search text

GA4 Youtube Video Tracking

When a Youtube video embedded on the page is played, the event is tracked.

Events tracked (status):

  • start
  • complete
  • progress (10,25,50,75,90,100 percent)

Event w_video_(status) dimensions:

  • w_event_category = Youtube video
  • w_event_action = Video Status
  • w_event_label = Video Title
  • Metric value = progress percentace

GA4 Copy to Clipboard

When a text selected by the user is copied to clipboard.

Event w_copy_to_clipboard dimensions:

  • w_event_category = Copy to Clipboard
  • w_event_action = HTML element
  • w_event_label = Text (trimmed to max. 100 characters)

GA4 Custom Event based on dataLayer data

If you want to push special event to Google Analytics, you can use this piece of code and just change eventCategoryeventActioneventLabel and eventValue values.

dataLayer.push({
    'event':'wasCustomEvent',
    'wasCustomEventData': {
        'eventName':'w_contact_submitted', // GA4 event name - max. 40 characters (use only lowercase and underscore)
        'eventCategory':'Form Submit',
        'eventAction':'Contact',
        'eventLabel':'Job offer',
        'eventValue': 0
    },
    'eventCallback' : function() {
        dataLayer.push({'wasCustomEventData': undefined });
    }
});

You can see it in action on the Demo Website.

Event w_custom_event dimensions:

  • w_event_category
  • w_event_action
  • w_event_label
  • value

E-commerce tracking

Only in GTM Setup Bundle version Complex.

For GA4 ecommerce tracking it is necessary to implement GA4 Ecommerce dataLayer as described in official GA4 documentation. But many ecommerce website platforms already implemented the dataLayer. If you are not sure, ask your ecommerce platform provider or web developer.

Ecommerce dataLayer documentation:

E-commerce Events supported in this GTM Setup Bundle:

  • view_item_list
  • select_item
  • view_item
  • add_to_cart
  • remove_from_cart
  • view_cart
  • begin_checkout
  • add_shipping_info
  • add_payment_info
  • purchase
  • add_to_wishlist

Google Ads

Only in GTM Setup Bundle version Complex.

Additionally GTM setup contains:

  • Google Ads Conversion tag – triggered on purchase event
  • Google Ads Dynamic Remarketing tag – triggered on view_item_list, view_item, add_to_cart, purchase

Setup in 5 minutes. Really?

Save time and effort and get reusable Google Tag Manager setup with advanced Google Analytics 4 tracking.

→ Read more