My Dilemma:
I am one person. Google does not automate GAUIDs, Google provides wonderful tools that depending on what “Scale” means to you. That are not very efficient at “Scale!” Are you smiling in agreement, good, ice is broken so let’s do this thing. Friendly reminder I am big fan of not re-inventing the wheel, I am big fan of studying wheel’s and attempting to make them faster, better and free.
Ask:
- 4,750 UAIDs for a Global OEM + Google on my back to get it done
- Generate, Place, Publish each pixel/tag across 4,750 child sites
- All one-by-one
- I am the only person working on this ask across the globe – now a few more folks know and it’s well documented.
It Was Easy Until:
At no point was this task easy, to manually generate 4,750 Google Analytics IDs was time-consuming, not to mention the 200+ accounts I was leading strategy for to include supporting search parity for a priority product, “scream.” I estimate total hours spent to be about 32Hrs, give or take a stand-up break or two just in generating these IDs. It was the best career, work, life experience ever actually. Yes, I’d do it all over again.
Generate a UID – (the process)
- Create a google analytics accounts or login if you already have one (google.com/analytics)
- Locate your Admin widget, bottom left hand corner of UI
- Create an account (first issue I ran into, is that I have a free account, yes that is correct. Another conversation for another day)
Free is an issue, because you are only allowed 100 accounts, with 50 properties
Remember in this example I am a global entity, managing global OEMs, yes this is new for us, however not for me and since I have a free account. Yep you got it I needed more accounts. Luckily we have a pretty good relationship with Google, so thank you Google for granting me another 100 free accounts. 360 is a great tool to overcome this if your relationship isn’t that great.
When you create an account, you are creating your 1st property, “not going to get too deep into the weeds here.” The only way to effectively scale this is one of 3 ways. Click, click, click by yourself and copy past URLs and whatever nomenclature you want for each property and account. Standardization is recommended so you might want to use sheets, or excel to build out what your GA might look like. Second have a partner or partners (to which I did not have) or third, come up with some automated script that can read multiple screens and replicate the process, like an excel macro.
The Hard Part Is Over:
- Created 107 Accounts
- 50 Properties under each account
That’s over 5,000 manually generated UAIDs
Now the Fun Begins:
Tools I recommend, okay devs and engineers give me a break!
- Chrome or Firefox (I haven’t used windows explorer since Freshman year in college) Love you Microsoft!
- Learn to use Dev Tools hit F12 (explore its fun, lots of interesting things you can do with a site, to a site from this perspective) Example like deleting those nasty pop-up membership forms. You can read the New York times for free. Learned this from PM, it is amazing what you can piece meal together.
My FAVs ^^^^, if you don’t know what these are, get them, study them, use them.
- 1st – Page Analytics
- 2nd – UET (Bing)
- 3rd – Tag Assistant
Each one of these are for your browser
- You also need GTM
- You need a handy script
- A developer or access to your Master Site or Site(s)
- Excel
- Google Sheets
Good you have your tools. If you do not go get them.
The Basics are Over: Here is how I scaled this puppy out.
First thing first I did this manually. They say before you can find a shortcut you first have to learn how to do it the hard way. All 4,000+ UAIDs created one by one, copy and pasted into an excel spreadsheet. To get past the 50 limit, I called and requested an exception for 100 per account. If you are here reading this, my assumption is you have Google Analytics setup down. Next you want to keep a record/journal that can be transferred to confluence, one note etc. (tribal knowledge is bad knowledge)
Second thing I decided on was to spend 3 weeks plus or minus another week or two, manually loading these into GTM. I created a lookup table via a variable. Now remember this functions like a library or can, if on site a, execute. It helps reduce the number of tags firing on-site.
4 thousand rows later, 8 thousand total copy and paste form fields later. My container size was too big. Wonk, Wonk, Wonk lol.
I just found out it was not possible to scale this, Google’s unlimited open source Tag Management system had limits. 200kb to be exact. Roughly 1,750 rows (plus or minus a few) for each container. I have six now.
So Just to Let You Know I Am Not Copy and Pasting Again forget it
Options:
- Outsource to a team
- Get Interns
- Do it yourself
- Create a JavaScript Library <- My FAVORITE WAY
Or while your friend @MitchLarson is working with you on scaling Price Extensions via BigQuery and you are becoming more comfortable with scripts. Think of a way to automate, exchange data between excel and your web browser. Sorry Mitch. I definitely owe you a food truck lunch at a conference or some sporting event.
Here is how you effectively scale, utilizing resources at hand. Saving time, money, fingers, mouse and keyboard.
Step 1:
Open up your EXCEL or Goog Sheets w/ your hundreds or thousands of rows of UAIDs & domains
Step 2:
Log into GTM, open up your container and go to your variable where your look up table sits
Step 3:
Hit F12 on your keyboard in the window that your GTM container and variable are open in
Step 4: Find console in dev tools, will vary by browser. Firefox is at bottom, Chrome is Upper right as seen below
Step 5:
Use this link: https://docs.google.com/spreadsheets/d/1-iZ9GxVgAUoaEDl2wlBDrGG0c9NIKUAKjrte_msI2H0/edit#gid=0
Step 6: Once you have completed this sheet, you will copy the 5 column all data and rows and paste into the console section of your open browser
Should look like what you see below:
Hit Enter to Execute the Code in the browser and Yep you now have automatically generated 4500 + rows into your GTM container.
The lesson I learned going through this process, it is okay to do it the hard way. Without first understanding what is possible, I might not have thought of the things that were not possible “initially.” It did take up a bit of my time, maybe more than my leadership might have wanted. However, in the end, I was able to clean up and create my containers in minutes. Most importantly I learned something new. That is now able to be passed along to peers, teammates, and anyone else in need of quickly scaling google analytics across their sites.