Affiliate Reporting: Preserve Leading Zeros in Campaign IDs

Treat campaign and placement identifiers as labels so spreadsheet imports do not silently merge distinct reporting records.

Campaign identifiers are labels, even when they contain only digits. Before using an affiliate report to compare placements or allocate media buying budget, confirm that the import process has preserved those labels. This proposed workflow focuses on one small but consequential check: keeping leading zeros intact.

Define the identifier contract

Document what the source system considers a valid key. Ask whether 00127 and 127 identify the same object or different objects, whether identifier length is fixed, and whether keys are unique across accounts. Do not infer those rules from appearance. A numeric-looking label should not become an arithmetic value merely because a spreadsheet can interpret it that way.

Keep campaign, account, and placement identifiers in separate columns. Where the reporting system requires an account plus a campaign identifier to identify one record, preserve both. Display names are useful for readers, but they should not replace source identifiers in a mapping table.

Check the import before building the report

Retain the original export unchanged. When the import tool supports column types, explicitly treat identifier columns as text. Compare a short set of known keys before and after import, including a leading-zero value and a long digit-only value. Use the tool's documented behavior rather than assuming that quotation marks in a CSV guarantee text handling.

  • Compare the exact characters and lengths of selected keys.
  • Count distinct identifiers before and after transformation.
  • List multiple source keys that now map to one imported key.
  • Keep the raw identifier beside any normalized reporting identifier.

Use a collision example to explain the risk

Consider a hypothetical source where campaigns 00127 and 127 are distinct. The first has 18 approved orders and the second has 7. If a transformation converts both keys to the number 127, a grouped report may show a single row with 25 orders. The total order count still reconciles, yet the campaign breakdown is wrong. A matching grand total therefore does not prove that identity was preserved.

Conversely, the source may explicitly define those strings as equivalent. In that case, a documented normalization can be appropriate. The important distinction is whether the transformation follows a confirmed source rule or silently invents one.

Recover from the source, not from a guess

If leading zeros have already disappeared, reload the original export with the correct type settings. Adding zeros to every short value is only valid when the source contract establishes the required width and meaning. Otherwise, padding can create new incorrect keys while making the data look tidy.

Before using the corrected report, reconcile both totals and identifier mappings. Keep a brief note of the import rule and the affected reporting period so colleagues can reproduce the correction. The BlueFriday media buyer overview offers broader performance marketing context; this checklist addresses reporting integrity and does not claim that any particular campaign will become profitable after correction.