5 Steps to a Powerhouse Website Tagging Strategy
A website tagging strategy is your plan for which tags go on your site, why each one is there, what data it collects, and how you keep it working over time. It connects your business goals to the technical setup of your analytics, marketing, and advertising tools, and it lets you verify that the data you collect is accurate and collected with the right consent.
Building a tagging strategy and the tagging plan that goes with it is one of the most important steps for any analytics or digital marketing program. And one of the most common failures is simply not building one. Before you start installing tags on your site, walk through the following steps so you have all your ducks in a row.
We approach the topic as if we were building a new website, but you can apply these same principles no matter how old your site is.
1. Determine Business Requirements
Ask yourself: “Why does my website exist? What am I trying to accomplish?” Your answers give direction to your tagging strategy. Once you understand the “why” behind your website, it’s much easier to identify which tags (vendors) you need.
Identify the Why
If you’re not quite sure why your website exists, consider this: most websites exist to sell more stuff. Even if yours isn’t an eCommerce site, you’re likely trying to grow revenue by giving customers a reason to engage with your products or services. For example:
- Financial services websites offer information and services online so you’ll do more business with them.
- Automobile companies try to send you to one of their dealers so you can buy their cars.
- Restaurant websites entice you to try their food.
- Media websites sell their content, sell space to advertisers, or both.
Whatever your content is, you’re selling merchandise, services, or ideas.
Learn more about how knowing your “why” affects your web analytics strategy.
Write Your Business Requirements
To achieve your “why,” what does your website need to accomplish? The answer to that question is your list of business requirements.
Here are some examples written in plain language:
- I need to monitor user behavior on lead-gen landing pages so I can optimize conversions.
- I need to test different variations of a web page to see which performs best.
- I need to capture campaign variables to establish ROI on campaigns.
Once your business requirements are listed out, you’ll have a good idea of the technologies you need:
- Web analytics
- A/B testing
- Attribution
Business Requirements for Web Analytics Tools
For web analytics tools like Google Analytics or Adobe Analytics, identify your primary metrics before installing the analytics tag. You can measure just about anything, but you don’t need to measure everything. Deciding on your key metrics first keeps your analytics tied to business objectives instead of collecting data nobody uses.
2. Choose Vendors
You may already have vendors in mind from writing your business requirements. For each candidate, run through this vendor approval checklist:
- Does the vendor meet our business requirements?
- Does the cost fit within our budget?
- Does the vendor comply with the data privacy regulations that apply to us?
- What data does the tag collect, and where does it send it?
- Can the tag be controlled by our consent management platform (CMP), so it only fires after a visitor gives the right consent?
- Does the vendor provide training and support?
Questions 4 and 5 matter more every year. A tag that collects more than you expect, or fires before a visitor opts in, can create privacy risk even if the vendor itself is compliant. If you still feel good about a vendor after this checklist, you’re ready to move forward.
3. Document Your Tags, Variables, and Data Layer
Once you’ve defined your business requirements and selected vendors, you can start documenting each tag and the variables within it. (For a quick refresher on tags, check out the introductory blog about website tags.)
Tag documentation goes by many names, including a tagging plan, a solution design reference (SDR), a tech spec, or a variable strategy. To keep it simple, we’ll call it a tagging plan.
Your tagging plan is the technical counterpart to your business requirements. Think of it like a building’s blueprint: it describes exactly how to build and wire the structure.
Here is a small portion of an example tagging plan for Adobe Analytics:
Plan Your Data Layer
A data layer is a JavaScript object on your site that holds the information your tags need, such as page type, product ID, order value, or login status. Instead of each tag scraping values off the page, every tag reads from the same data layer.
This makes your tagging much more stable. When a designer changes a button or moves a price on the page, your tags keep working because they read from the data layer, not the page layout. It also means every vendor gets the same values, so your analytics, advertising, and testing tools report on the same numbers.
Add your data layer to your tagging plan. For each variable, document its name, what it means, example values, and which tags use it. That way developers know what to build, and analysts know what to expect.
Keep Your Tagging Plan Alive
Don’t let your tagging plan become a dusty document buried on someone’s hard drive. Keep it online and accessible to anyone deploying tags, testing tags, or analyzing data. Every time your website or analytics setup changes, update the tagging plan.
4. Deploy Your Tags
You have your blueprint. Now it’s time to build. There are a few ways to deploy tags.
a. Manually on Each Page
If you have a small website where each page has unique tagging needs, you could install each tag on each page. We don’t recommend it, since every change means editing pages one at a time.
b. Through Your Content Management System
Another option is to install tags using the templates in your content management system (CMS). In your CMS, you can group pages with similar tagging needs and install the required tags in the heads of those templates. For example, all the product pages on an eCommerce site probably use the same analytics variables, so they can share the same tag configuration. This is better than tagging manually, but changes still usually need a developer.
c. Through a Tag Management System
A tag management system (TMS) let you deploy tags through a single container code installed on every page of your site. Instead of adding tags to each page, you configure the TMS to fire specific tags based on rules you set. To use another eCommerce example, you might fire certain tags whenever a /product/ page loads.
A TMS takes more setup up front, but it’s the easiest option to manage long term. Most tag management systems also integrate with CMPs, so you can tie each tag to a consent category and block it until a visitor opts in.
d. Server-Side Tagging
Some teams also use server-side tagging, where the browser sends data to a server you control, and that server forwards it to your vendors. This gives you more control over what data each vendor receives and can reduce the number of scripts running in the browser. It adds infrastructure and cost, so it’s usually a fit for larger teams with specific privacy or performance needs rather than a starting point.
Testing and Quality Assurance
If you have a large site and tags with a lot of custom variables, test those tags before pushing them to your live site. Check two things: that each tag collects the right values and that it respects consent. A tag that fires correctly for a visitor who accepted cookies should stay blocked for a visitor who clicked “Reject All.”
How much testing you can do depends on your dev resources and how mature your tagging plan is. Best practice is to turn your tagging plan into rules that a tool can check automatically, so testing doesn’t depend on someone remembering to do it.
5. Maintain Your Website Tagging Strategy
Tagging strategies often fall apart because nobody maintains them.
Websites have a lot of moving parts and change constantly. Tags can stop working for many reasons, such as:
- Errors in page code that prevent tags from firing or collecting data
- Conflicting code from other JavaScript functions
- Site structure or data layer changes that break the values your tags rely on
- Misconfigured TMS rules that cause tags not to fire, or to fire when they shouldn’t
- Changes to your CMP or consent settings that let tags fire before consent
- Slow-loading page elements that stop a tag from collecting data
If you don’t check your tags regularly, something can break, and you won’t find out until your reports look wrong. That’s why tag governance belongs in your tagging strategy.
Tag governance is made up of tag auditing, tag monitoring, and tag validation.
- Tag auditing. A tag audit crawls a large number of pages on your site and reports which tags are present, what data they collect, and where they’re missing. Combined with a tagging plan, tag auditing tools help you catch problems across your whole site.
- Tag monitoring. Tag monitoring focuses on your most important pages and user paths, like checkout, sign-up, or login, and tests them on a frequent schedule. Where an audit gives you a broad picture, monitoring alerts you quickly when a key conversion path breaks.
- Tag validation. Tag validation is a form of release validation. Before you release a website update, you set up tests to run before and after the release so you can confirm your tags still work.
Tag governance brings your tagging strategy full circle by making sure your chosen vendors work properly, meet your business requirements, and respect your visitors’ choices. On a large website, doing this manually isn’t realistic, so an automated governance solution like ObservePoint can do the checking for you.
Frequently Asked Questions
What Is a Website Tagging Strategy?
A website tagging strategy is a plan that defines which tags run on your site, why each one is needed, what data it collects, and how you’ll keep it accurate and compliant over time. It usually includes business requirements, a vendor list, a tagging plan, a deployment method, and a governance process.
What Is the Difference Between a Tagging Strategy and a Tagging Plan?
The tagging strategy is the overall approach, starting from business goals. The tagging plan is the technical document inside that strategy, listing each tag, variable, and data layer value in detail.
Do I Need a Tag Management System?
Most websites benefit from one. A TMS lets you add, change, and remove tags without editing page code, and it makes it easier to tie tags to consent categories. Very small sites with few tags can get by without one, but they might outgrow that setup.
How Often Should I Audit My Tags?
Audit your full site on a regular schedule, and monitor your most important pages and user paths more often. Also test before and after every website release, since releases are when tags most often break.