Create a tag in GTM
1. Log on to your GTM dashboard and click on Tags on your workspace.
This will usually be blank since you are just starting out and have not created a tag before.
2. Click on the New button, then click on the Tag configuration icon on the pop-up. Select the tag you want to set up from the list of built-in tags.
You can also click the edit icon in the top right corner. GTM has a list of built-in tags you can choose from. Examples include Google Analytics, Google Ads, and Twitter Universal Web tags. If the type of tag you want to create is not listed there, you can still create a tag using Custom tags.
3. Select a track type by clicking on the drop-down button with a list of options to define what needs to be tracked.
If you chose a built-in tag like Google Analytics, select what you need to track, like Page View or other metrics. If you chose another tag, enter the information it requires. For example, tags like Conversion linker do not require anything other than setting up with just a click.
4. If the tag is Google Analytics, click on New Variable from the Google Analytics settings drop down. Copy your tracking ID from your Google Analytics account then paste it and leave the Cookie Domain as Auto.
Variable setting is not applicable to all tags. Variables answer the question, Where to send the hit? New variable is the most powerful variable in GTM when it comes to Google Analytics because it does a lot of the lifting for you. Once you set this up, you can use it over and again. Retrieve your Google Analytics tracking ID from Tracking Info > Tracking Code in GA. Cookie Domain is what allows subdomains to automatically track through. You do not need to do any new setup for subdomains. There is rarely a need to change from Auto, unless you have some extremely restrictive things you do not want to track.
5. Set up a trigger by clicking the trigger icon and choose when to send a hit.
Triggers define the condition or set of conditions that should be met for the tag to fire. Set up your own triggers by clicking on the + sign in the top right corner of the screen. All pages is the only trigger that is built into GTM. A trigger set to All pages means that the tag will fire on every single page of your website. If this is not what you need, create a new trigger and define its conditions, like the page path or specific user clicks.
6. Click on Save and rename your newly created tag.
Name tags according to their tag type and track type. For example, you could name a Google Analytics tag as GA – Page View. Naming your tags according to tag type and track type will help you recognize them in your tag list.
7. Test your new tag by clicking Preview on your GTM dashboard, then reload your website and check for a Tag manager pop-up, showing your new tag details and the hit.
All created tags MUST be TBVed, meaning Trusted But Verified. An Orange banner at the top of your screen indicates you are in preview mode. If you do not see the tag manager pop-up, you can tell something is wrong and you may need to check if you missed any of the steps above. On the pop-up window, check the summary to see if your new tag has fired correctly and other tags are not firing wrongly. Investigate further by clicking on the tag name to check if the details such as the track type, trigger, cookie domain, tracking ID, are exactly the way you want them to be. Note that the code gtm.js is GTM’s way of indicating Page view. After confirming GTM is doing its job, go to the platform you set up a tag for and trigger a hit. For example, if you are setting up a tag for Google Analytics, check that it has properly recorded your hits.
8. Verify that your tracking worked. For Google Analytics, log on to the dashboard and click on the Real-time report > Content, then check if your track type works.
You can play around and click multiple pages on your website and check if the numbers add up in your GA dashboard. Do not leave your new setup to chance. You need to verify over and again to ensure its working correctly. Verification is also necessary to avoid mix up when you are working with multiple scripts and tags.
9. Publish the newly created tag in your GTM workspace by clicking Submit, enter the details of the tag and click Publish.
It is necessary to publish your GTM container any time you modify tags or triggers, otherwise your changes will not be applied to your live website.