Sometimes it is very difficult to apply changes to sites. It is due to rigid CMS that limits efforts of customization or the development queues. In this situation, SEOs should rely on meta-CMS. It sits over the existing CMS and in this way applies necessary changes to the web pages. But a tag management system is much better than the meta-CMS. Here we’ll discuss Google Tag Manager (GTM).
How to make HTML changes using GTM?
The sort of HTML changes you can make include adding new elements to site; amending the existing content; changing attributes of elements and removing elements from the site. For these changes, you need knowledge on:
CSS selectors and HTML – to change elements of site or pull data from
JavaScrip especially jQuery – to inject elements in the site
Inserting an element
Apply a custom HTML tag in GTM to insert an element into a HTML structure. And the change can be applied with and without jQuery.
Extracting data from the page
Using GTM variables
To use GTM variable, you need setting a variable for each element you want to pull out of the site. It is simple. Go to Variables and click on New under the User-Defined Variables. For individual elements, define a new DOM Element-variable. Also use an ID or CSS selector matching with each element.
Another way to retrieve an element from a website is to use jQuery. In this way, you won’t have to touch the GTM variables. Here you will use a HTML tag. Its advantage is that you don’t need setting individual variables. Only one HTML tag can give you complete information you need.
Tag to insert mobile switchboard tags
This tag is used for adding switch tags to mobile sites with the same page and URL structure. The tag can replace “www” with “m” in domains. Also the tag will add a canonical tag to the mobile pages where it is missing. This tag can be customized to include any subdomain of a mobile site.
Tag to add noindex tag
This tag will automatically replace meta robots tag with noindex follow meta robots tag. Its benefit is to make noindex the product pages that are out–of-stock. If you trigger the tag, it will detect out-of-stock products and add noindex tag with each element.
Tag to self-referential canonical
This tag adds canonical tags to pages. These tags point to themselves or parameter less version of the page, if the page has URL parameters. Take care when implementing this tag.
Also there are tags to insert:
Breadcrumb structured data
Product structured data
Applying changes on the site with rigid CMS structure would become a hassle free affair with GTM. And you can easily write tags with little knowledge on HTML and CSS selectors. In SEO, you have to keep sites updated. It is digital marketing where only updated sites can work. But SEOs face difficulties in customizing rigid CMS.
This Post Has One Comment
Hello! I’ve been reading your site ffor some time now and
finally got the bravery to ggo ahead and give you a shout out from Humble Texas!
Just wanted to say eep up the good job!