Campaign IDs in Google Ads should be treated as 64-bit integers
If you have a Google Ads account, you have probably gotten this notification in late July or early August 2019 in your inbox. If you read this aloud to most people, including marketers, you would probably see a confused look on their faces. To a programmer, this makes perfect sense!
What does this mean?
Basically, it means your Google Ads account number should be able to support a much larger number than previously allowed in Google Ads.
This is especially important if you use your account number with the Google API library, such as for custom reporting that we have built in Motoza’s report platform.
I still don’t get it.
Don’t worry – if you don’t have custom software and simply manage your Google Ads account from Google’s dashboard, chances are you won’t need to worry about it. If you have a Google Ads account with Motoza, then we are already taking care of it. If you have received this message otherwise,, you may want to contact your programmer or forward this message to us and we can look at it.
The technical details.
If the tl;dr on the Google Ads notice is all you care about, you can stop here.
For those who really care what this is all about, I’ve written a more technical description based on my Computer Science background (it’s already been a decade and a half since college, yikes!).
When Google built out these account numbers, they used something called a 32-bit integer. A bit is either a ‘0’ or a ‘1’, nothing else. If you break coding down to its very core, that is all it is – a ton of 0s and 1s that your computer can understand.
32 bits looks like this:
Each box represents 2x – the right-most box represents 20, the equivalent or 1, the box to the left of it represents 21 , or 2, and increasing until you get to 231 . The left-most box is reserved for the “sign”; the plus or the minus sign (I’ll stop here for further explanation).
Converting decimal to binary.
In the real world, we use a variety of numbers from 1 to 10. 12397, 746, and 93778 for example. However, the computer does not know what these mean unless you convert them into ‘0’s and ‘1’s it can understand. So you have to convert our decimal system to binary.
For example, this is what the number ‘5’ looks like in binary (the green represents ‘1’, the grey represents ‘0’):
Reading from left to right, the first green dot represents 22 and the second green dot represents 20 . If you add these up, 22 + 20 , which equals 4 + 1 equaling 5.
If you toggle the other grey boxes, you’ll get larger numbers; assuming the first box is a ‘+’ sign, the largest number you can generate for a 32-bit integer is 2,147,483,647. In the past, 2147483647 was the largest account number Google Ads could handle.
From 32-bit to 64-bit.
Instead of having 32-bits from 20 to 231 , now you can go from 20 to 263 ! The largest 64-bit integer is 9,223,372,036,854,775,807, giving Google Ads an exponentially greater number of accounts IDs they can assign before they run out.
So that is what Google is saying – just make sure you’re able to handle larger numbers for their Google Ads account numbers if you’re using their API 🙂