Field note · Measurement · November 2026
Campaign names change, IDs do not
Joining ad spend to site visits on the campaign name works until someone renames a campaign. A stable ID in the URL and a small lookup table make the join hold.
Two tables that would not join
The request was ordinary. Put the cost from the ad platform next to the visits and conversions from web analytics, per campaign, per day. In a large group, we loaded both into the data warehouse. The daily figures from the ad platform matched its interface to the cent.
Then we joined the two tables on the campaign name. A good share of the rows found no partner.
What the names looked like
The name in the ad platform is typed by the agency. The name in analytics comes from a parameter in the landing URL. They are meant to be the same. They were not.
Some URL values were built by joining several fields, and came through as "null_null" when a field was empty. Some landing pages had the parameters typed by hand, months earlier. One campaign in analytics could correspond to four in the ad platform. And campaigns get renamed, for good reasons: a new year, a new offer, a new naming rule.
One person in the team kept a spreadsheet that mapped one set of names to the other. It worked as long as that person had time.
The fix: an ID in the URL
Every campaign, ad group and ad has a numeric ID in the ad platform. It never changes, whatever the name becomes. The platform can insert it into the landing URL by itself.
So we agreed the following with the agency.
- Add the IDs, keep the names. The names stay in the URL for the people who read reports. The join uses the ID.
- Remove before adding. Two old parameters that no report used were deleted first, so URLs did not grow.
- Test the automatic insertion. Where the platform could not insert an ID by itself, the agency entered it by hand.
- One lookup table. ID on one side; name, channel, product and objective on the other. It lives next to the data, not in someone's files.
- An alert. When a campaign ID appears that is not in the table, an email goes out. Say a new campaign starts on a Monday: the gap is seen on Tuesday, not at the end of the quarter.
Three things that slowed us down
The tag manager decides which URL parameters are read. A new parameter needed a release on every site, and that release had its own calendar. Ask about it before agreeing a date with the agency.
There is no history. The ID exists in the data from the day the URL changes. For earlier months, the hand-made spreadsheet remains the only bridge. Keep it.
Each platform has its own syntax. The model was first applied to search, then extended to the other channels, one at a time, checking URL length each time.
What we take from it
A name is for people. A key is for joins. Put a stable ID in the URL, keep the labels in a table you control, and let an alert tell you when the two drift apart.
Checking how campaigns are identified, from the ad platform to the report, is part of our marketing data audit.