ETLMCPData Conveyance Works
Log in Start free
Guides

Deleted Snapchat ads: spend kept, names sometimes blank

Why Snapchat rows with real spend can show a blank campaign or ad squad name after you delete something, and how to report on them by id.

Coming This connector is coming.

When you delete a campaign, ad squad or ad in Snapchat, its spend does not leave your etlmcp table: each row is built from Snapchat's daily figures for an ad id, and a missing name never removes a row. What can go missing is the text around the figures. If Snapchat will no longer return a deleted ad squad or campaign, its name (and sometimes its id) is blank on the row, unless etlmcp stored it during an earlier sync. Everything below describes what happens when the Snapchat connector is available.

Why the names come from somewhere else

Snapchat's stats report answers with ids and numbers, not names. In its documented examples, each breakdown entry carries an id, a type and figures, but no name. So for every sync etlmcp makes a second set of requests: it lists the account's ads, ad squads and campaigns and joins them to the figures by id. The chain runs upward. The ad gives its ad squad id, and the ad squad gives its campaign id. A break anywhere in that chain blanks everything above it.

What Snapchat says about deleted entities

  • Deleting cannot be reversed. Snap's API Patterns page says a deleted object cannot be undeleted.
  • Deleted entities are read with a flag. The Campaigns, Ad Squads and Ads references each document a read_deleted_entities parameter on their get and list requests. With it, a deleted entity carries a deleted attribute; without it, that attribute is not shown.
  • The docs contradict themselves on ad squads. The Ad Squads reference documents read_deleted_entities for fetching one ad squad and for listing them, yet its section on the delete request says a deleted ad squad cannot be retrieved through the API. Nothing on the page says which statement wins, so plan for either.

What etlmcp does to keep names

  1. Every listing of ads, ad squads and campaigns is sent with read_deleted_entities set to true, so deleted entities are asked for, not skipped.
  2. An ad, ad squad or campaign that the report needs but a listing left out is requested by its own id, again with read_deleted_entities.
  3. If Snapchat still answers that the entity cannot be found or seen, the sync goes on. The row keeps its ad id and figures, and the parent fields it could not resolve stay empty. Any other error fails the run instead, so that a short answer never wipes good names.
  4. Before the new rows replace the stored ones, etlmcp looks at what it already holds for the same source. For each row with an empty ad squad, campaign or name, it takes the newest stored row for that ad (or that ad squad) that names a campaign, and fills only the empty fields. It skips the fill if a stored id disagrees with a new one.

A name etlmcp has seen once survives later syncs; a name it never saw stays blank.

When you will see blanks

  • You deleted before the first sync. If an ad squad was deleted before etlmcp ever stored it, and Snapchat refuses to return it, the row has no stored name to fall back on.
  • A deleted ad squad blanks its campaign too. The campaign id is read from the ad squad, so when the ad squad cannot be read, the row has an ad id and an ad squad id but no campaign id or campaign name, unless an earlier sync stored them.
  • A backfill of old days. Stored names are looked up across the whole source, not just the days being pulled, so a backfill reuses names from any earlier sync of that source. It cannot invent names the source never stored.

How to report on these rows

  • Group and join on ids (ad_id, adgroup_id, campaign_id), not on names. Totals by id stay complete when a name is blank.
  • When a report groups by campaign name, add a bucket for empty names instead of filtering them out. Filtering them out drops real spend from the total.
  • If you plan to delete old campaigns in Snapchat, let one sync of the account finish first, so their names are stored.
  • To fill a stored history with names, sync the days that still have readable entities; see backfills. Routine syncs re-pull only the last 7 days, as the trailing window explains.

What each Snapchat field means, and how the sync is built, is on the Snapchat connector page and in the Snapchat sync guide.

Related

Sources

  1. API Patterns | Snap for Developers — developers.snap.com, checked
  2. Campaigns | Snap for Developers — developers.snap.com, checked
  3. Ad Squads | Snap for Developers — developers.snap.com, checked
  4. Ads | Snap for Developers — developers.snap.com, checked
  5. Measurement | Snap for Developers — developers.snap.com, checked