Consider this reading bonus material. It's here if you want to learn more about the different installation methods. However, we recommend GTM for its simplicity and will suffice for the majority of cases.
Introduction
On the technical side, there are a few ways to set up all your tracking.
The three main options are:
- Manually coding your tracking
- Using Google Tag Manager
- Using Segment
Manually coding
Your engineering team will have to walk through your codebase and add code for all the things you want to track.
Google Tag Manager
Google Tag Manager is a free tool you add to your site and app. Your engineers will have to do a little work to set everything up in the first place, but after that, you can handle the rest yourself (without code).
You'll need to spend a bit of time in GTM to get everything configured. It’s a bit confusing for people who have never used it. We’ll cover the specifics in a separate reading if you end up running with it.
We recommend GTM only if you're a small team, with a small/simply website, or if you don't have engineering resources. GTM can become very time consuming if you have a lot of events and a lot of tools. Even tracking 20 events with 5 tools requires making 100 tags.
We track ~100 events for 10 tools. That'd be 1000 tags.
Segment
Segment is a paid tool, but it saves your engineers a lot of time and hassle in adding new event and adding new tools to your site and analytics stack.
Just like GTM, your engineers have to put in some effort at the beginning. Then you can set up and manage the rest. Compared to GTM, you don’t have to do nearly as much work. Instead of 100 tags like in the example above, there'd only be 20 small snippets of code to add. But it does cost money.
Hint: We've partnered with Segment to get startups in our community $50,000 in free credits for their products.
To learn more, check out demandcurve.com/segment.
Let’s dive into the basics of what’s involved in these different methods, and their advantages and disadvantages, to help you make the best decision for your business.
Manually coding
Advantages
- Your engineers already know how to code
- They can quickly learn the specifics of adding tracking to your site.
- They might not already understand GTM or Segment, and would have to learn those tools to add them in.
- Works for everything
- You can track any tool or ad channel manually. You don't have to rely on another app tracking things for you.
- This means if things ever go wrong, you always have the power to fix problems within your team.
- It’s...sort of...free
- It costs engineering time to set up, and to maintain.
- (Engineering time is expensive, though.)
Disadvantages
- It’s time consuming and repetitive
- Your engineers will have to add in code for every single event and for every single tool that tracks it. It’ll take your engineers a long time to add in all the events and track all the data you want them to. Plus it’ll be very boring for them.
- Many won't take it seriously and it will take a few rounds of back and forth and hassling to get them to install them properly.
- If it takes your team a ton of time to make engineering changes, you may wait weeks for this to happen.
- It bloats the codebase
- This makes it take longer for your engineers to code new features in the future.
- This doesn’t affect you. But it does affect your engineering team.
- You can’t do anything yourself
- Unless you know how to code and have access to the codebase, you’ll be totally reliant on your engineers to add everything in. If you don’t have enough engineers on your team, this can be a big problem.
- It’s harder to verify that everything has been added correctly
- It takes a lot of time to manually make sure that every event for each channel is firing at all, and to make sure it’s firing at the right time with the right data.
- There can be a lot of back and forth with the engineers to fix the installation.
When to manually code
- When you have a simple site/app that doesn’t require much coding
- When you have a brand new site/app that is very basic
- When your tracking is mostly set up already. Switching to GTM or Segment could be more work than it’s worth.
Google Tag Manager (GTM)
Advantages
- It’s free (sort of)
- It costs a little engineering time to set up.
- It costs your time/marketing time to set up and maintain.
- Less coding needed
- After you set up GTM, you don’t need to involve your engineers at all. (Except in some extreme cases.)
- It keeps your code clean
- All the third-party tools and code snippets are added through GTM’s website and not your own codebase. Your company’s code will be a lot cleaner as a result.
- It’s very safe
- You don’t risk breaking your codebase every time you run ads on a new channel.
- You do everything in "draft mode". Then, you can preview your site to test all the changes you made to make sure they’re working the way you want. There’s a nice UI that pops up to show you which tags are and are not firing.
- You can see a history of who changed what and when. And you can go back to previous versions.
- GTM works with everything
- Segment only works if there is an existing integration for it. And it relies on the integration being totally up to date. You can use GTM to insert any tool you want.
Disadvantages
- It can be a lot of repetition if you have a lot of events and channels. One tag per event per tool.
- It takes a little time to learn.
- Engineers may break things without realizing it
- If you trigger events based on things in HTML (like a form's name, or a button's class), and the engineers were not fully aware of that, they may change something that breaks your events.
- You have to copy-paste code more often
- Segment removes the need for coding anything at all. You never have to see the code running under the hood. With GTM, you have to deal with code a little more often.
When to use GTM
- When you’re on a budget.
- When your site/app is simple and doesn’t require a lot of tracking.
- When you only care about tracking a few events.
- When engineers don't have time to do your grunt work, but you do.
Segment
Advantages
- A lot less time and repetition
- After initial code setup, it takes minutes to set up Segment for the main tools and ad channels.
- A lot less time-consumingfor your engineers
- Your engineers will only have to log each event once with Segment. Segment handles sending data to the right places after that.
- It’s easy to test that everything is working
- Segment has an excellent dashboard for seeing all the events and data being logged on your site.
- It also lets you see events fire off in real-time. So you only have to click around your site for a few minutes to check if things are working.
- It works with a wide variety of platforms and tools
- Almost all the tools you’ll use already integrate with Segment. So they’re very easy to install and set up.
- It drastically cleans up your code
- Just like GTM, it removes a lot of code from your codebase.
Disadvantages
- It’s not free
- Segment starts at $120/mo for 10,000 monthly users.
- It doesn’t work for everything
- You’re at the mercy of what Segment integrates with. If an integration doesn’t exist or is out of date, you can’t use Segment for that tool
- Although they have a new feature called Segment Functions that lets you quickly create an integration.
- For example, Quora and LinkedIn don’t fully work with Segment yet. So you’d need to manually add code to your site for them. Snapchat doesn’t work at all yet.
- We actually use Segment's Google Tag Manager integration to trigger Quora and LinkedIn tags based on events we log in Segment. So Segment at least made that process a bit easier.
When to use Segment
- When you have a complex site or app where you’re tracking a lot of events and data.
- When you can afford it.
- When you value time, simplicity, and peace of mind over cost.
Hint: We've partnered with Segment to get startups in our community $50,000 in free credits for their products. So you don't need to worry about the costs.
To learn more, check out demandcurve.com/segment.
What to do next
First, make a decision on which tracking tool to use. (You may be already using a tracking tool — check with your team.)
For manual installation, you’ll take the docs you make in the upcoming project and send them to your engineering team.
For Google Tag Manager, move on to Conversion Tracking - Advanced > Google Tag Manager (GTM).
For Segment, move onto Conversion Tracking - Advanced > Segment.