6 Easy Steps to Creating a UA-ID Macro in Google Tag Manager (GTM)

Tony Villanova - December 23, 2013

When deploying Universal Analytics on your website through Google Tag Manager (GTM), you will need to reference your UA-ID. This step-by-step process will not only help you in the early stages of deploying Universal Analytics through GTM, but will come in handy any time you need to reference your UA-ID.

1. Once inside the GTM interface, select a container and click on the little Lego brick to create a new Macro.

UA-ID-GMT-1-1

2. You will then see the Create New Macro screen as seen below.

UA-ID-GTM-2-1

3. It is important that you give any of your Macro’s a very descriptive name. As time goes by and you start to have 20, 30, 40+ Macros listed, you will be able to tell exactly what they are just by glancing at them. Example: MoreVisibility – Website – UA-ID

4. Next, select Constant String as the Macro Type.

UA-ID-GTM-4-1

5. For the last box, enter your UA-ID as the Value

*Important Note: Make sure you include the UA before the ID number along with any dashes, as shown in the example below.

UA-ID-GTM-5-1

6. Lastly, click save to complete your new Macro.

UA-ID-GTM-6-1

© 2023 MoreVisibility. All rights reserved.