Posted: Aug. 17, 2021

Updated: May 4, 2022


Introduction: CMS and Website Builders

These days, there is a wise range of content management systems (CMS) and website builders available for maintaining your digital presence. CMS is a software used to create and manage websites. It’s similar to website builders such as Wix or Squarespace, but the difference is that CMS generally has more in-depth functionality, meaning you can customize the backend code. Some of the most popular CMS are open source, so the community can continue developing and adding to it.


If you have worked on web development before, you are probably already familiar with traditional CMS, where the front and backend are tightly integrated through the technical architecture. WordPress is the most popular CMS, powering a third of websites on the Internet. Other traditional CMS include Joomla and Drupal. You will need a bit more technical expertise to use Drupal, but it offers more security, and is commonly used for government or enterprise websites.


Headless CMS such as ButterCMS and Contentful, is a backend exclusive CMS without the frontend (thus “headless”) that is based on RESTful API or GraphQL API. Headless CMS are gaining momentum in recent years because it allows developers to choose their desired programming language (PHP, Java, Ruby, etc.) and create their own frontend without relying on proprietary software. Headless CMS also reduces operational time and expenses, and are more efficient in the long-run when you run into issues like redesigning or rebranding.


The rest of this post will just focus on Wix vs WordPress for SEO. As an SEO specialist, the question of recommended website hosting platforms often comes up between my colleagues. As for my experience ,this personal website is on Wix Premium because I wanted to learn a new platform. Before launching this site, I only had worked on WordPress for several years, and had to decline clients who needed help on Wix sites because I wasn’t familiar with it. At the time of writing, I have now worked extensively on both Wix and WordPress hosted websites, and learned more about both platforms. This article focuses on the open-source WordPress.org, not WordPress.com.


Technical SEO

The first difference is that WordPress is a CMS and Wix is a website building platform. Wix has been growing a lot recently so this seems unlikely, but one thing to keep in mind is that if Wix goes bankrupt or decides to cancel their platform, you’ll have no recourse. However, since that’s pretty unlikely, this mostly just comes down to a matter of preference - some marketing professionals who are unfamiliar with html/css might prefer Wix, but I actually found it quite frustrating that I can’t freely code my own website.


With WordPress, you can either choose a template or edit the code to customize your website. Wix basically only offers templates, and does not allow you to directly edit the html, css, JavaScript, php file, etc. On Wix, you can’t fully control technical SEO as you would on WordPress. If you look at the code on a Wix site, there is a lot of code bloat, much of which is JavaScript. But there are some things you can do, such as reducing image file sizes, using the same/common font, and limiting the number of Wix apps to reduce page load speed.


The Wix editor has a feature for adding custom html code, but it’s pretty clunky and doesn’t let you adjust the format and placement of your custom component. Although I have not tried it yet, there is also Wix Velo, which adds an open-development platform where you can add scripts to the front and back end of your website through the Wix editor.


One advantage of Wix for technical SEO is during the initial setup, you can submit your XML sitemap and link to Google Search Console automatically. You can also create redirects and mark certain pages as noindex with just the click of a button.


Plugins and Apps

In the WordPress community, there is a saying: "there's a plugin for that", and it's true - WordPress has thousands of free and paid plugins in the official WordPress plugin directory. WordPress plugins, written in php, can integrate seamlessly with WordPress to extend functionality and add new features to your site. As a site administrator, you can install plugins from the admin area or manually download and install them through an FTP client. Here are some of the top WordPress plugins for SEO:

Autoptimize

Autoptimize is a WordPress plugin for optimizing your page speed. The free version has extensive options for optimizing html/css and JavaScript code to improve your site's performance, even when already on http/2. You can use the API to customize the features for your site's specific needs.

Speed Booster Pack

Autoptimize is strictly an optimization plugin, and does not do any html caching. This makes Speed Booster Pack a good complement to Autoptimize. In addition to optimizing your website's code, Speed Booster Pack also includes features for caching, preload assets, and core web vitals.

Insert Headers and Footers

A simple but excellent plugin, Insert Headers and Footers does exactly what the name suggests. Add tracking code like Google Analytics, Google Tag Manager, Facebook Pixel, etc.

W3 Total Cache

On the topic of page speed, W3 Total Cache (W3TC) is another recommended plugin that increases site performance and reduces load times, through features such as CDN integration and accelerated mobile support. Regardless of which plugin you choose, increased site speed can lead to higher rankings in SERPs, and even a boost in conversion rates.

WPML

By default, WordPress doesn't easily allow you to make your site multilingual, which can be a problem for global businesses. That's where WPML comes in. It's an easy-to-use, SEO friendly plugin for creating multilingual sites within WordPress. As a bilingual digital marketer, I've worked on several WordPress sites using WPML.

Jetpack

Jetpack is the most popular WordPress plugin, with extensive features to supercharge your site in all aspects, from security to user experience. It's developed by Automattic, the team behind WordPress, so you can trust the plugin and know that it's backed by exceptional developers. Some popular features include CDN services, up/down time monitoring, and automatic XML sitemap.

Code Snippets

Code Snippets allows you to add custom code to your site, and toggle them on/off on certain pages. The code can be anything - html, css, JavaScript, XML, PHP, etc. For example, you can add snippets for Google Ads or Facebook pixel tracking if you are running PPC campaigns.

SEMRush SEO Writing Assistant

The SEMrush SEO Writing Assistant provides automated recommendations for content optimization based on the qualities of Google’s top 10-ranking pages. Content writers can check if their texts meet various content-quality requirements. If you prefer drafting in Google docs, there is also an add-on.

Yoast SEO

If you regularly work on WordPress sites, you've probably already heard of Yoast SEO. I'd especially recommend this plugin for SEO beginners or copywriters who need to make sure they've checked all of the requirements for on-page keyword optimization. However, Yoast SEO is not limited to on-page SEO. It also provides recommendations for internal linking, technical configuration, and more.

Rank Math

Rank Math is another SEO plugin for WordPress, similar to Yoast SEO. This plugin also allows you to generate an XML sitemap, connect to Google Search Console, and control access to plugin features based on user roles. However, you only need one WordPress SEO plugin on your website. Using multiple can cause plugin conflict.

Hide Post

Most WordPress themes will show your latest posts in chronological order. However, sometimes you might want to hide certain posts from the top page. The Hide Post plugin lets you do just that, in only a few clicks. However, at the time of writing this post, the plugin has not been updated in 4 years. If the plugin is no longer working well, you can also hide a WordPress post from your top page manually by adding custom code to your theme functions.php file.


Wix also offers a wide range of handy SEO features, which you can find in the app marketplace from your Wix account. Some of the most popular Wix apps are Wix Stores for building an online store, Wix Chat for instant messaging with site visitors, and Wix Bookings for scheduling appointments. For my simple personal website, I am currently using Wix Blog for my blog, and Wix Forms & Payments for my contact form. I am also using the paid automation feature to send confirmation emails to people who fill out the contact form.


On-Page SEO

For on-page SEO, Wix unfortunately has a bad reputation among SEOs, but it has improved features recently. Ahrefs did an extensive study of 6.4 million domains, and concluded that there is no causal relationship between the platform used (Wix vs WordPress) and a site’s ability to rank in the SERPs. WordPress sites got more search traffic overall, but Wix had more search traffic on domains with 100+ monthly organic traffic.


Multilingual SEO

At the time of writing, Wix has a Multilingual App for creating translated versions of your site, but does not support the hreflang tag, and you cannot access the code to add it. For this reason, I would not recommend Wix just yet for multilingual sites. On WordPress, the WPML plugin is great for multilingual sites.


Mobile Site

If you use WordPress, your theme is most likely already responsive and can adapt to all screen sizes. You can check this in Google Chrome's Developer Tools. Wix also creates a mobile version of your site that complies with Google's requirements. You have the option to disable the mobile version, although it is generally recommended to keep it on. You can edit the design of the mobile version on mobile editor, without affecting the desktop version.


Migrating from WordPress to Wix, or vice versa

Migrations from WordPress to Wix or vice versa are both common, as businesses have different needs and preferences that would be better suited for either platform. Unfortunately for us, Wix and WordPress are competitors and not compatible with each other, so there’s no quick and easy way to migrate. Wix is getting better at helping their new customers migrate from WordPress to Wix, and they have an option that lets you import WordPress blog posts. For exact instructions see: Importing Blog Posts from WordPress to the Wix Blog. If on the other hand, you have outgrown Wix and want to migrate to self-hosted WordPress, then the easiest way is probably to import your blog posts via RSS.


Support

Whether you choose Wix or WordPress, you can join a helpful community of marketers and web developers. I’ve had a good experience with Wix customer support on several occasions. I just answered a couple of questions in their online customer support chatbot, and got a phone call back within minutes to solve my issue. Wix users can also submit requests for new features and vote on them. WordPress has no customer support, but since it hosts one third of all sites, the forums and social media are always active with WordPress developers asking and answering each other's questions.


Posted: May 22, 2021

Updated: Apr. 10, 2022


If you've recently taken new ownership of a Google Ads account, or simply haven't audited your existing account in a while, this could be a good time for a check up. Regular audits help ensure that your campaigns are still running as efficiently as they were when you launched them. Even if your ROI is positive, you can always find areas for improvement.


This post explains how to audit a Google search ads account, find areas for improvement, and implement changes.


Keyword Bids

Start by checking the overall health of the account, including keyword bids. There are several metrics to use as a guide. First, the Lin-Rodnitzky (L/N) ratio, a metric introduced by a 3Q Digital, is defined as follows: divide the overall account CPA by the CPA of all keywords with at least one conversion. A ratio between 1.5-2.0 is generally good. If it's below 1.5, you might be too conservative, potentially missing out on converting keywords. If the ratio is above 2.0, you might be wasteful, over spending on non-converting keywords.


Next, check the broad match ratio. What proportion of your budget is spent on broad match keywords? Broad match tends to be less efficient than phrase or exact match, so you generally want to keep the ratio around 20%.


Finally, check specific settings in the historical data using filters. For keywords with at least 3~5 conversions, you can pretty much rely on the CPC and CPA data that was accumulated. If there are less than 3 conversions, the data is still volatile - one additional conversion could greatly affect the CPA, so keep an eye on it and make adjustments as needed.


If there any keywords that had high spend but zero conversions over several months, consider cutting your losses and stopping them. I generally use $100 as the cutoff but it depends what is "high" for your account and business.


Once the account has accumulated several months of data, 30+ conversions monthly, and proper conversion tracking setup, consider automated bidding for maximum conversions, if that fits your business goals.


Campaign Structure

It's important to check the high-level campaign structure when you conduct a Google Ads audit. Create a custom report and check that all eligible ad groups have at least one ad, and non-dynamic ad groups have 1~20 keywords. If an ad group has too many keywords, the ads might not be targeted to user search queries, and consider splitting it up into two or more ad groups.


For most campaigns, the best practice will be to use STAGs (single theme ad groups). However, if you have a large budget (over 1k) and high conversions (30+) you can try SKAGs - single keyword ad groups. SKAGs gives you control over showing unique ads for every single keyword, but it can get complicated to maintain the campaigns and make bulk changes when needed.


Even with the new dynamic ads, Google still recommends including 1 responsive and 2 expanded text ads per ad group. Finally, use negative keywords to prevent overlapping and inner competition within your account.


Attribution Model

The default attribution model is last click, and that works fine for many businesses. However, in some cases you could be over or under reporting a campaign's performance by using the wrong attribution model. If you're spending over 10k per month or getting traffic from different sources (display campaigns, retargeting, organic traffic, etc.) one of the other available models might be a better fit. There is a model comparison tool in Google Ads so you can check.


IP Exclusion

Avoid wasting budget on clicks from your own team. You can access IP exclusion settings in the left sidebar. However, with many people working from home now, IP exclusion is more complicated. In some cases it might not be worth the hassle, but you can try using a VPN, Chrome plugin, or extension.

Average CPC, CPA, and CVR

Average performance metrics across all industries, according to WordStream

​

Search

Display

Avg CPC

$2.69

$0.63

Avg CPA

$48.96

$75.51

Avg CVR

3.75%

0.77%

Note that this is just a benchmark, since the metrics depend on many many other factors,such as your brand strength and SEO to name a few. However, it's something to keep in mind and see how you compare.


Conversion Tracking

Assuming you are already tracking your main conversion, you could gain additional insights by tracking secondary conversions. might gain insights from tracking other events as well. For example, if your primary conversion is a contact form submission, you might add page as a secondary conversion. For CPA bidding and conversion data purposes, only the primary conversion should be included in conversions.


Visit the conversions tab to confirm that everything is being properly tracked. The status should ideally be recording conversions. No recent conversions and tag inactive status doesn't mean that your tracking is broken - it could be that you simply haven't gotten any conversions in the past 7 days. New conversion events will first have an unverified status that should change once Google Ads sees an initial conversion, and you can do a manual conversion test to speed up the process.


It can take up to 24 hours for conversion data to appear in Google Ads, even when everything is working perfectly. If after 24 hours conversions still are not showing up, you might start troubleshooting. Note that if you have some conversions reported, then conversion tracking is probably set up correctly (i.e. the tracking either works or it doesn’t, in terms of setup). However, it’s still possible to have missing conversions. Here are a few things

to consider.

App Tracking Transparency (ATT)

Apple released iOS 14.5 in April 2021, which included app tracking transparency (ATT), impacting conversion tracking on iOS across many platforms including Google. Even if Google is still able to track your conversion, you can now expect up to 5 day delay in reporting. Meanwhile, you might be able to check your missing conversion in Google Analytics to see it was from paid and on mobile, which will give you a clue as to whether the problem is related to ATT.

Ad Blockers

Sometimes if the user has a third-party tool such as an ad blocker installed, it can prevent conversion tracking. According to research by Moz, ad blocker usage can be in the 15–25% range depending on region, but many of these installs will be default setups of AdBlock Plus, which does not block tracking. While you may be missing some specific conversions due to ad blockers, it shouldn’t significantly impact campaign performance. And since all advertisers suffer this problem equally, it is a level playing field across the Google network.

Auto-Tagging

If you are collecting conversion data in Google Analytics and sending it to Google Ads, you must have auto-tagging enabled. This setting is disabled by default, so you’ll need to change it in your Google Ads account settings.


Auto-tagging works by adding the gclid (Google Click Identifier) parameter to the URLs people click through from your ads. For example, if someone clicks on your ad for www.example.com, the final URL will look like www.example.com/?gclid=123xyz. Depending on what service your website is hosted on, you may need to add a bit of code either directly or via Google Tag Manager, to successfully pass gclid to your landing pages.


By default, auto-tagging overrides and manual UTM parameters that you may have set up. If you would like to have UTMs take priority, you can do that by enabling "Allow manual tagging to override Auto-Tagging" in Google Analytics, under property settings in the admin section. Google Ads will still pass any values that are not overwritten to Google Analytics, so you won’t lose the tracking details from gclid.

So what can you do about missing conversions?


Import Offline Conversions

One solution is to manually import them back into Google Ads as “offline conversions.” You can simply enter the conversion details in an Excel or Google Sheet and upload it to Google Ads. This help page has step-by-step instructions and templates. Please note that you needed to have auto-tagging enabled at the time of the conversion, because the gclid needs to be included in your upload.


Ad Extensions

There's a lot to consider when optimizing Google Ads - bid strategy, campaign structure, conversion tracking, etc. Ad extensions are often an afterthought, but they actually have a ton of benefits. Not only do they increase your SERP real estate, but they can also get you more qualified leads.


Google has directly stated that ad extensions will increase ad rank, and that extensions are favored because they allow Google to offer a better variety of ad formats and include relevant information for users. All of these factors can increase your CTR, lower your CPC, and cut costs in your ad account overall.


Google Ad extensions do exactly as the name implies - they extend your ad. Ad extensions append additional information about your business to the main body of your ad.


Sitelink Extensions

Sitelink extensions add additional links under your text ad in the SERPs. These links direct users to different pages on your site, other than the landing page.


Examples of common sitelink extensions:

  • Plans & Pricing

  • Success Stories

  • Contact Sales

  • Download Brochure

Callout Extensions

Callout extensions are 25-character text snippets describing the strong qualities of your services. Examples of common callout extensions:

  • Free Shipping & Delivery

  • 3 Convenient Locations

  • Free 30 Day Trial

Structured Snippet Extensions

Structured snippets are lists of specific services, amenities, locations, etc. Select a header from the drop down list of headers, and include at least 3 items for each one.


Lead Form Extensions

Note that your site requires a privacy policy page in order to use this extension type. Lead form extensions are a relatively new feature in Google Ads, as they were released in beta in 2019. They allow the user to fill out a form directly from the ad, without ever clicking into your website. This can be advantageous for BtoC companies looking to increase their lead pools. On the other hand, in my experience the user probably won't change their behavior just because the lead form is available. Depending on your business, it could be better to direct users to your website, where they can learn more about your offering before filling out a form.


Sitelink, callout, and structured snippet extensions are universal extensions, meaning that Google recommends every advertiser to use them. Other extension types such as call, app, lead form, etc. are more situational for each business.


Task Automation

Fortunately, Google offers many automation tools for managing your ads account efficiently. If you have custom needs that aren't covered, you can always use Google Ads Script and API to build your own tool.


Automated Rules

Google Ads has automated rules to save time and catch potential issues as soon as they occur. For example, you can receive an email notification when the CPC exceeds a certain amount, or automatically pause a campaign when the CPA exceeds a certain amount. You can also combine rules - for example, pause a campaign when the CPA exceeds $100 and the total cost is over $300. This way, the rule won't apply to new campaigns that might still be in the learning phase.


Google Ads Editor

For bulk editing, use Google Ads Editor to export your ads to Excel, make changes, and import again to publish to live. This is also useful if you require approval from a client or superior before publishing your ads. For more advanced campaign builds, you can automatically build a campaign from a spreadsheet.


Google Ads Scripts

Even if you aren't a developer, Google makes it easy to just copy and paste the whole source code to your Google Ads scripts. Some useful scripts to get started are the link checker, account anomaly detector, and ad customizer. There might be different source codes for single and manager accounts, so make sure you use the correct one for your account.


Google Data Studio

Google Data Studio is a great tool for automated reporting and sharing with your client. Obviously it's part of the G suite, so you'll get a smooth native connection to Google Ads.


If you're looking at third party tools beyond G suite, Tableau is an advanced tool similar to Data Studio, but with more powerful features for analytics.


Ads Disapproved

One of the most common reasons for disapproved ads is "destination not working," which means that the landing page can't be reached by Google's crawlers, due to some issue such as a broken link or redirect. Unfortunately ,Google does not provide the exact reason why your ad was disapproved, so you'll need to figure out the cause and solution. Here are some common possible reasons for ads disapproved due to "destination not working," and how to fix them.


Server Response Code

There are several ways to check the status code - developer tools in your browser, Google sheets, extensions, or SEO tools. Although Google does allow ad links to be redirected, too many redirects can cause slow page load speed and result in poor user experience. An http 200 response code works best. A common discrepancy is omitting www. from the destination URL, resulting in a 301 redirect to the www. subdomain. Also, note that the display URL does not need to exactly match the destination URL.


CNAME Record

Google ads can be disapproved if your landing page doesn't appear on your registered domain. This issue can arise if you are using different landing page building services. Parked domains are not allowed, and subdomains can get flagged although they are allowed. By creating a CNAME (canonical name) record, you can link your landing page to your root domain.


Accessibility

Even if your ads are only targeting a specific location, Google's policy is that your website should be universally accessible. You should have a robots.txt file granting googlebot explicit permission. A possible solution for this issue is to redirect foreign traffic to a splash page that says "this website is not available in your country."


Dynamic Tracking URLs

If you have enabled auto-tagging in Google Analytics, then Google will pass the gclid along with the URL. However, if your website can't handle URL parameters, then it can cause an error. In some cases, just enabling auto-tagging in Google Analytics was enough to get the ads approved. Although Google disapproves many ads, mistakes do happen - if you believe that your ad was mistakenly disapproved, you can try making a minor edit and resubmitting. If you still can't get the ads approved, go ahead with the appeal. Appeals usually go through within a few business days, and you can check the status in your policy manager. You can also try contacting Google Support.


Credits, Coupons, and Promo Codes

Finally, if you are running Google Ads campaigns, perhaps you were fortunate enough to receive free credits, coupons, or promo codes. The good news is that your account could be eligible for more.


Google

Google offers free ad credits to help new users getting started, and sometimes existing users as well. If you are new to Google Ads, or haven't advertised in a while, Google will give you 100$ in ad credit after you spent 25$.


Since the COVID19 pandemic, Google also gave existing SMB advertisers up to 1,000$ in free ad credits. There was no application process - Google simply inserted the ad credits to qualifying accounts. This campaign had a few requirements, specifically, the account had to be active 10 out of 12 months in the past year to be eligible. Google also has a grant program for registered nonprofits - learn more here.


Website Providers

Website hosting services often offer Google Ads credits for new users of their premium plans - Bluehost, Squarespace, and Wix, just to name a few. Also, check any marketing tools and software that you are already using.

Posted: July 16, 2021

Updated: Feb. 26, 2022


While you could hard code analytics and conversion tracking tags on your site, it's generally better to use Google Tag Manager (GTM) or an alternative such as Tealium or Mixpanel. There is no direct SEO advantage of using GTM, but it could improve page speed depending on how many tags you have, which might indirectly boost your SEO.


Install Google Tag Manager

These days, apps and websites tend to include multiple marketing and analytics codes such as Google Analytics, Google Ads, Google Optimize, Mixpanel, and Facebook Pixel, to name a few common ones. GTM works well even with non-Google products. Now, you can clean up all of those separate third-party tracking codes, and just copy and paste one instead - the GTM container code. In theory, you can even use one GTM container for multiple domains, although the best practice is to have one GTM container per domain especially for large sites.


Google previously recommended placing the container code immediately before the opening body tag, but now is a little different. GTM has split the container, so the first part should be placed in the head, and the second part in the body.


GTM provides you with the exact code to copy and paste to your website. You can find the installation code along the top navigation under Admin → Container Settings → Install Google Tag Manager. For sites hosted on WordPress, use the Insert Headers and Footers plugin or insert the code directly from wp-admin/theme-editor.php, or Appearance > Theme File Editor.


The first part is a script tag, which includes a JavaScript function that loads your container to the page. It creates a new script tag, and sets the source to the URL to your container. This should be placed immediately inside of the head to optimize tracking. The higher up in the page the snippet is, the faster it is loaded.


The second part is a no script tag, and it's actually optional. This is just a backup tag that allows you to track users without JavaScript, so it's not important in most cases. It's telling the browser: if the user does not have JavaScript enabled, then render an iframe version of the container to the page.


Add DataLayer

DataLayer is used to feed data to GTM such as clicks, form submissions, purchases, user ID, login method, etc. The best practice is to add dataLayer above the container. Otherwise, it can cause issues such as the container code overwriting dataLayer.


Form Submission Tracking

Here are several methods for tracking form submissions with GTM, generally in order of easiest to most complicated. Since the feasibility of these methods will depend on how your site is coded, I created this flowchart on Canva that shows the relevant tracking methods for each situation. Detailed explanation follows the flowchart.

Form Submission Tracking with GTM - flowchart

If your users are redirected to a confirmation page after the form submission, you can simply track page views for that page. Otherwise, you'll need to dig deeper in the page's source code to find some variable that GTM can recognize. At this point, if you are tracking Google Ads conversions, remember to add All Elements in addition to All Pages as a second trigger for your Conversion Linker tag.

Contact form submission with confirmation message

If the form displays a unique confirmation message upon submission, you can use the Element Visibility trigger type in GTM. The contact form on my website is an example of this situation, because the "Thank you for contacting Rei Morikawa" message in the bottom right appears upon successful completion of the form.


If the element has an ID, it's easier to use Selection Method: ID. Otherwise, use CSS selector, which is explained later in this post. Also in the trigger configuration settings, regardless of which selection method you choose, check Observe DOM changes and change Minimum Percent Visible to 1 percent.


Button Click Tracking

If you form has neither a confirmation page or message, you'll need to track button clicks in GTM. This time, we'll be using the Click - All Elements trigger type. There are several possible variables that can be used for this method, but Click ID or Click Classes is probably the most common. Generally, Click ID might be more reliable, but it depends on your dev environment.


To see which variables are available for you, use preview & debug mode in GTM or check dataLayer in the Console. Note that Click Element cannot be used for this method, but it is explained in the following section on CSS selectors.


CSS Selectors

If none of the above methods so far have not worked, it's time to use CSS selector. You'll need to use CSS selector for some of the following situations.

  1. You are using the Element Visibility trigger and Selection Method: ID is not available.

  2. There are no unique variables available for tracking button clicks using Click - All Elements trigger type.

  3. The button is made up of multiple elements.

We've already seen situations 1 and 2, so let me just elaborate about 3, using the same example of the contact form on my website. Here is the source code for the "Send" button.

<div id="comp-k0kz041v" aria-disabled="false" class="_2UgQw">
	<button aria-disabled="false" data-testid="buttonElement" class="_1fbEI">
		<span class="_1Qjd7">SEND</span>
	</button>
</div>

The background and text elements are separated. However in GTM, we want to treat them the same, because we want to track form submissions regardless of whether the user clicked precisely on the "Send" text, or anywhere else within the button.


This is possible with CSS selectors, which allow you to write complex conditions for selecting certain elements on a website. To implement this method, start by creating a Click - All Elements trigger, but this time choose Click Element matches CSS selector for the variable. For this example, either of the following the CSS selectors should work.

 #comp-k0kz041v, #comp-k0kz041v *
 ._2UgQw, _2UgQw *

Deciphering the above CSS selectors:

  • # indicates id; . indicates class

  • Comma indicates OR condition

  • * is wildcard

The first CSS selector in plain English means, element with ID comp-k0kz041v or any child (or child of child, etc.) of that element. The second one means, element with class _2UgQw, or any child of that element. Note that spaces will break your CSS selector, so you can simply replace any spaces within the ID or class with a period.


This is a basic setup example, but here is an expanded list from W3schools of CSS selectors for reference: CSS Selector Reference


Trigger Groups

By default, if you add multiple triggers to a single tag on GTM, they are treated as an OR function. The tag will fire as soon as any of the triggers has its condition met. To treat multiple triggers as an AND function, use Trigger Groups, which were introduced on GTM recently in March 2019. Trigger Groups will be useful if you have multiple forms with the same confirmation message, or multiple buttons with the same class.


Debugging

There's several ways to check if your GTM tags are set up and firing correctly. First, check your website's source code and make sure that the GTM script is implemented by searching for gtm.js. If that wasn't the problem, you can check the other solutions below.


Preview & Debug Mode

As the name suggests, preview & debug (P&D) mode in GTM allows you to preview your site and check which tags are firing, and what data is sent to third-party platforms. Please note that P&D was updated in October 2020 to shift from 3rd party cookies to first party storage, so if you are following a guide or video that was published before that, it will look different.


As a freelancer or agency-side marketer, you might not have access to the client's GTM account. Even as an in-house specialist, there might be a different department that controls GTM. However, there are several methods to verify GTM even if you can't access the account.


Tag Assistant Legacy

Tag Assistant Legacy is a Google Chrome extension by Google for GTM, an extremely useful tool for testing and debugging. You can use it to troubleshoot GTM, as well as Google Ads, Analytics, and DoubleClick implementation.


Test Conversions

You can also simulate a test conversion - the way to do this depends on your specific conversion event. For example, if the conversion event that you want to test is pageviews on GA, just open the page in another tab and check GA. If you aren't sure because there are other pageviews, you can add a test utm such as:

/?utm_source=test&utm_medium=test&utm_campaign=test

In some PPC platforms like Facebook, you can just visit the confirmation page to manually simulate a conversion, and confirm it in the conversion events page. For Google Ads conversions, add the following parameter to the end of your URL to simulate a click.

?gclid=test&wc_clear=true

Custom Code

Setting up tracking between Google services like Analytics and Ads is pretty straightforward, and the built-in variables should be enough to get the job done. But if you're using GTM to connect your website to third-party platforms like Pardot or HubSpot, you'll need to add custom html or JavaScript via new user-defined variables. Note that custom JavaScript must be nested in an anonymous function with return value.