Facebook Audience API - Targeting Audiences using Shapefiles

246 Views Asked by At

I know it's possible to target ads geographically based on zip codes and/or the radius around a given coordinate. Is it somehow possible to target ads geographically based on a shapefile (census Canada for example) or do we have to essentially "build" the shapefile using a combination of zip codes and radius inclusions / exclusions?

1

There are 1 best solutions below

0
On

It seems the only real "shapes" for a target audience is either providing a country, state (or province if in Canada), congressional district and some zipcodes:

Canada province:

Audience Details:
  Location - Living In:
    Canada: Alberta
  Age:
    18 - 65+

US Congressional District

Audience Details:
  Location - Living In:
    United States: Pennsylvania's 1st District (US:PA01)
  Age:
    18 - 65+

US Zipcode

Audience Details:
  Location - Living In:
    United States: Beverly Hills (90210) California
  Age:
    18 - 65+

However, some zipcodes map to a simple point so you need to fallback to a coordinate and radius.

I guess the only way to create an audience for a given polygon is to try and fill its surface with circles, considering those circles have a minimum radius, so it will always be just an approximation.

There are examples of circle-packing around. I repaired an old gist (https://gist.github.com/shashashasha/1020117) to make you a plunkr example.

See this plunker

However, circle packing considers that circles shouldn't overlap each other, so you'll have to figure out another way to achieve the same.