GTM Preview Pane Not Appearing in HTTPS Version of Website

Recently I tried to QA some tags within Google Tag Manager but had issues with the debugging console actually showing up. What was particularly perplexing about this issue was that the preview pane would show up for the non-secure version of the website, but not the secure version of the website. After doing a quick Google search and running through the 17 possible suggestions to fix the issue provided by Analytics Mania, I was still at a loss.

Luckily I work with some pretty smart developers who were able to determine it was a problem with the way the base tag was working. Once that was fixed, we were able to see the preview pane and debug our tags without a problem

What is a Base Tag?

The base tag, also called the document base URL, is a tag located in the header that “specifies a default URL and a default target for all links on a page” (W3 Schools). So say for example you have a domain called link going to your About Us page and the link is simply /about-us/. Your base URL will determine the domain attached to /about-us/. A base URL isn’t required in development. Depending on how it’s implemented, it can help you or hurt you. In our case, it hurt us.

BaseURLHTML

Relativity and GTM’s Debug URL

Google Tag Manager’s main script is a secure script. The debug script is a relative script. You can tell that because instead of starting with a hostname, it starts with //.

Google Tag Manager Debug URL

Most times the relatively of GTM’s debugging URL isn’t an issue. However if the base URL forces an unsecure URL, the preview mode won’t work. If you see this issue, please contact your developer to update the base tag to reflect a secure URL. Voila! Your preview pane will be working again.

Summary

The list of reasons why Google Tag Manager preview pane won’t show up is seemingly endless. Reviewing your base tag can be one more check on your list to ensure you can properly debug your tags.

Stay in the know with email updates!

* indicates required

Can I Use CIDR Notation in Google Analytics?

 

In your quest for the utmost data integrity, you’ve begun to filter out IP addresses. Filtering our IP addresses is a simple but effective way of making sure that your dataset is as accurate as possible. But what happens when your IT team gives you an IP range you don’t recognize? Read below to see how to handle IP addresses with slashes in them (CIDR notation) in Google Analytics. 

IP Addresses with Slashes: CIDR For Dummies 

The IP range that you’re probably used to seeing is something like XXX.XXX.XXX.XXX, where each XXX is what’s called a “class.” The first XXX is class A, the second class B, the third class C and the fourth class D. Each class contains a number 1-255. 

For those of us at home, we most likely have only one IP address. Your single IP address might look something like this: 10.0.0.0. For larger organizations, it’s likely that you have a range of IP addresses. The range for your organization could look something like this: 10.0.0.0-10.0.0.255. 

As you can guess, this number is a pain to write over and over, so it’s no wonder that developers created a shorthand for ranges like this called CIDR. CIDR (pronounced cider) stands for Classless Inter-Domain Routing. 

Truthfully, CIDR is more complex than I’m making it out to be. More than just a nice shorthand, CIDR was developed as a new way to allow network administrators more flexibility when assigning IP addresses. This flexibility was important in making sure that there weren’t unused IP addresses like there was before. In our example above, the IP range would be abbreviated as 10.0.0/24. 

Does Google Analytics Support CIDR? 

As of right now, no Google does not support CIDR. 

How To Handle CIDR in Google Analytics 

While CIDR notation helps network administrators lighten their workload, it adds a little bit to our workload. First, you’ll need to convert your CIDR notation into a range of IP addresses. 

Your next step is to take your range and convert it to RegEx, which Google does support. I personally like this website because it does both for you in one step: https://d-fault.nl/CIDRtoRegEx. If you’re unfamiliar with RegEx, I’ve got a handy article on regex 101 here. 

Summary 

If your IT team gives you an IP address range that has a slash in it, don’t place it directly into Google Analytics. You’ll want to convert the CIDR notation (IP addresses with slashes) to RegEx so that Google can understand it and you can make sure you’re filtering out the right IP addresses. 

 

Stay in the know with email updates!

* indicates required

Why Do I Need Google Tag Manager When I Have A Developer?

 

In this blog I’ll go into the details of Google Tag Manager and why you’ll still want it even though you have a great developer. 

To begin with, if you haven’t read my blog on the difference between cookies, pixels, and tags, take a minute (15 of them really) to catch yourself up on the “tag” part of Google Tag Manager. 

What is Google Tag Manager 

Google Tag Manager is Google’s free tag management system. It’s a centralized location for marketers and other non-technical people to add, remove, and modify tags and other code snippets without altering the website code. 

The technical definition is helpful, but I find a metaphor really helps drive home what Google Tag Manager does and how it’s different than other Google programs, such as Google Analytics. 

Google Tag Manager Is Your Wallet

To begin with this metaphor, think of your tags as credit cards. If you have one credit card, it’s pretty easy to keep track of. This is often the case with people who only have one tag running on their website, for example Google Analytics.  

Additionally, if you’ve only got that one card, it’s pretty easy to throw that credit card into a purse without the use of a wallet. Developers have a similar process with your tags – they just throw your tag into a section a website, leaving you to read the every line of code if you ever want to find out which tags you have.  

Women, you know that your purse can often be a black hole. And men, although you may not own a purse yourself, if you’ve ever had your wife, girlfriend, friend or sister ask you to find something in their purse, you know it’s not a task for the faint of heart. This is why when marketers began getting more sophisticated with tracking and adding more tags to websites, i.e. throwing more cards in your purse without using a wallet, the need for a tag management system arose. 

A tag management system is like a wallet. Simply having a wallet doesn’t mean you have credit cards in that wallet, but now you have a more organized system in place for future cards. You may even decide you want to go back and take some cards out of your purse and put them into your wallet.  

While moving all your tags from your website code to Google Tag Manager may be a more time-consuming task than moving a credit card into a wallet, in the end you’ll have a more centralized place to store all these tags and be able to easily adjust them in the future. 

Developers and Google Tag Manager 

Earlier I said that tag management systems are useful because they don’t require a developer. This is completely true. However tag management systems like Google Tag Manager can be as complicated or as simple as you make them.  

Google provides lots of built-in variables for you to use, such as URLs, click IDs, and click text, but if you’re looking to reference more complex conditions, you may want to pull in a developer. A developer can look at the code on the page and then determine whether or not some custom javascript needs to created to be deployed in Google Tag Manager. 

Summary 

If tags are like credit cards, Google Tag Manager is the wallet that keeps them all in one place. Even if you have a developer, this handy tool is nice for keeping everything in one place without having to interpret any code. 

 

Stay in the know with email updates!

* indicates required

Do I Need To Use Anchor Tag IDs? 

 

In my previous blog post I went in depth about anchor tag IDs and the fact that they’re a completely optional part of web development. However as you delve deeper on the best way to track everything on your website, you’re going to have to weigh the pros and cons of whether or not you need these identifiers. 

Why aren’t anchor tag ids normally used? 

Anchor tag ids aren’t always used because adding them means more code. Generally speaking, the more code you have, the longer it is to develop and the slower the page loads. This is not the case 100% of the time, but think of it like a book – it’s going to take a lot longer to read a 200 page book than a 20 page book, unless your 20 page book is written at a university level and your 200 page book is written at a 3rd grade level. Same concept. But more than load time, the development time is really what makes it stand out. You’re essentially paying a developer more money to add something that does nothing on the page. Well, mostly. 

Why do you want to put anchor tag ids on a page? 

Now that I’ve discounted anchor tag IDs, citing page speed and development time, let me tell you about their benefits. Unless you have a super fancy web analytics program, you’re probably getting all your web analytics tracking from Google Analytics.  

Google Analytics is great in a lot of ways, but it has its limitations. With Google Analytics you can tell which pages people visited, but not which specific link they clicked on. All Google Analytics cares about is that you went to the next page, not that you interacted with one link more than another link. 

One of the best ways to tell which specific link was clicked is by adding that anchor tag ID, because as I mentioned before – it’s the only one on the page. It’s important to note though that it’s totally possible to track an individual link without an anchor tag ID, however I don’t recommend it. 

For example, many people track a specific link click based on the anchor text. This works great unless your anchor text is the same for all buttons (“Buy now!”) or decide that you need more keyword intensive anchor text for SEO and forget to tell your tracking team. Having the anchor tag ID is also especially helpful if you change your anchor text for an A/B test. Otherwise, you’re stuck trying to do some pretty complex regular expressions, which increases your opportunity for error. 

Summary 

Code smarter, not harder. If you’re looking to perform A/B testing in the future or if tracking the most successful CTA is important to you, it may be beneficial for you to put IDs on your anchor tags. However, if you’ve got links all over your website that you have no intent on tracking in the future, then my advice is to hold off on the anchor tags. Instead, avoid the anchor tag IDs, get your website to load quicker and have a website that’s developed faster. 

 

Stay in the know with email updates!

* indicates required

What Is An Anchor Tag and What Is An Anchor Tag ID?

 

Ahoy mateys! The next two blogs are all about anchors. At the end of these two blogs, you’ll know the what is an anchor tag, anchor text, and most importantly, anchor tag IDs. You’ll also know whether or not you need anchor tag IDs for better tracking on your website.

What is an anchor tag? 

Any time you have a clickable element in your website, you will also have multiple attributes associated with that element. When you group all those attributes together in coding, it’s called a tag. When we talk about an anchor tag, we’re describing the clickable element (i.e. a link) you have on your website and all the attributes associated with that clickable element.  

You’ll notice I said clickable element – not url. That’s because everything that’s clickable doesn’t have to necessarily be a url. You can have clickable images, hashes (#) that just bring you down farther on a page, and more. When we talk about attributes associated with that clickable element we can be talking about the different text on a link (anchor text), an ID associated with that particular link (anchor tag ID), and what that link goes to (href). 

what is an anchor tag

What are anchor tag IDs: A deeper dive 

As you begin to delve into Google Tag Manager (or any sort of basic web development for that matter), the subject of ids for anchor tags may come up. It’s even more likely to enter the conversion when you’re talking about click tracking (tracking clicks throughout your website).   

Anchor tag IDs are used to specify an element’s (a link’s) unique identifier. The key word here is unique – while you can have the same id throughout the site, you can’t have two of the same id on the same page.  

You’ll likely see anchor tag ids shortened as an “a id” – but don’t call them that. 98 out of 100 web developers won’t know what you’re talking about (and it makes you look a lot less knowledgeable). The best way to describe the “a id” is as an anchor tag id or an id for the anchor tag. These terms can be used interchangeably.  

IDs for anchor tags are completely optional, although depending on the documentation you see, it may seem as though it’s a standard in web design or you absolutely can’t do click tracking without it. Spoiler – they’re not a standard and you absolutely can do click tracking without it. 

Summary 

Anchor tags are what makes it possible for you to click on a website element and have it go somewhere. Sometimes you’ll see developers add an ID on them, but not always, as IDs are a completely optional part of web development. 

Stay tuned for whether or not you need anchor tag IDs for tracking in my next blog!

 

Stay in the know with email updates!

* indicates required