Full-Width Version (true/false)

How to create Custom Audiences in Facebook Step by Step Process

Custom Audience in facebook helps to target the audience which they have already established the relation either on Facebook or on other digital platforms, It is more advanced then Google remarketing however it has niche targeted audiences 
 
The following are the various ways to create custom Audience in Facebook advertising

Here I am pleasure to explain the process step by step .

a) Data file Costume Audience
   This option allows you to Upload a CSV file with detail instruction of the Audience which you want to target. These are some information you will have to put into the CSV. 
Such As 
  • Email address
  • Facebook User ID
  • Phone number
  • Mobile advertiser ID (such as Android or Apple user ID)


Once when you uploaded the file, it will take about 1 hr. to process and find the matches from its users. Min. 100 User record facebook recommended. Otherwise the audience is likely to be too small to have any kind of impact or reach. after processing, you'll see that the audience you've just created will be available to advertise to when you create a new ad:

From here, you can just create an ad as normal but it will be targeted just at this list of people.

Custom Audiences  API Integration steps given below 


Create

To create a custom audience you'll first need to create a blank audience. The endpoint to create an audience is
 https://graph.facebook.com/act_adaccountid/customaudiences
and it takes the following fields:
nametypedescriptionrequired
namestringname of your custom audienceyes
descriptionstringdescription of your custom audienceno
opt_out_linkstringYour opt-out URL so people can choose not to be targetedno
The response will be:
nametypedescription
idintegerID of custom audience
You can create a maximum of 500 custom audiences.

Add people to audiences

Then, you'll want to add people to the blank audience you just created. People can be added to audiences using either a hash of an Email Address, their Facebook ID, their Phone Number, their App User ID, Apple's Advertising Identifier (IDFA), or their Android advertising ID.
Oct 1st Breaking Change Notice:
Migration name: Custom Audience New Upload API
Adding/removing users from Custom Audiences will have a simpler upload format.
The users field from the https://graph.facebook.com/{audience_id}/users endpoint will be deprecated in favor of payload. Details of the payload field provided in Adding People to Audiences.
MD5 hashing will no longer be supported. For hashing fields, use SHA-256.
There are changes to the schema names when specifying the type of data. custom_audience_third_party_id is deprecated in favor of mobile_advertiser_id.
The response will contain details of the request instead of returning true.
Migration applies to GET, POST, DELETE https://graph.facebook.com/{audience_id}/users
To specify the list of people you want to add to your custom audience, use the endpoint
 https://graph.facebook.com/{audience_id}/users
with the following parameters:
nametypedescriptionrequired
users
Oct 1st Breaking Change Notice: This field will be removed
JSON ArrayList of people defined by email, phone number, FBID, app user ID, Apple's Advertising Identifier (IDFA), or Android's advertising ID. e.g. users=[{"email_hash":"HASH"}, {"email_hash":"HASH"}, {"email_hash":"HASH"} …]Yes
payload
Oct 1st Breaking Change Notice: new field
JSON ObjectTwo fields: schema, data. e.g.
payload = {
"schema":"EMAIL_SHA256",
"data":["HASH", "HASH", "HASH" ]}
Yes
hash_type Oct 1st Breaking Change Notice: This field will be removed. Use appropriate schemastringtype of hashing to use: md5 or sha256only if using sha256
Possible values for schema of each way of specifying a person
Key (old -> new as of Oct 1st)Description
id -> UIDUpload people based on their Facebook ID
email_hash -> EMAIL_SHA256Upload people based on the hash of their email address. Hashing method must be SHA-256
phone_hash -> PHONE_SHA256Upload people based on the hash of their phone number. Hashing method must be SHA-256
custom_audience_third_party_iddeprecated use MOBILE_ADVERTISER_ID instead.
MOBILE_ADVERTISER_IDUpload people based on the app user ID, Apple's Advertising Identifier (IDFA), or Android's advertising ID.
There is no max on the total number of people that can be added to an audience, but up to 10000 people can be added at a given time.
If the addition of the person succeeds, the API call will return true.
Oct 1st Breaking Change Notice: The response will contain the following fields:
nametypedescription
audience_idintAudience identifier
num_receivedintTotal number of users received
num_invalid_entriesintTotal number of users with invalid format or unable to decode.
invalid_entry_samplesJSON string ArrayUp to 100 samples of invalid entries.
It may take up to 1 hour before the people are added to the audience.

Read

By ad account

To retrieve information about the custom audiences your ad account has, make an HTTP GET call to
 https://graph.facebook.com/act_adaccountid/customaudiences?fields=<comma_separate_list_of_fields?
with the fields you wish to retrieve. Only id will returned by default once the "New Graph API framework conversion" migration is enabled. Otherwise, the response will be an array of the following fields:
Oct 1st Breaking Change Notice: New Graph API framework conversion
Migration name: Migrate Ads API endpoints to new Graph API framework for Q4 2014
Removal of following fields:
  • parent_audience_id
  • parent_category
  • status, use delivery_status or operation_status
  • type
  • type_name
Previously, these fields would return null or a single value, so are being removed for simplicity.
Changes to following fields:
  • account_id type change from int to numeric string ID
  • id type change from int to numeric string ID
Previously all fields were returned by default, now you must explicity request them.
NameDescriptionType
idThe ID of this custom audiencelong ->
Oct 1st Breaking Change Notice: response value will be a numeric string ID
account_idThe ID of ad account which this audience belongs tolong ->
Oct 1st Breaking Change Notice: response value will be a numeric string ID
approximate_countApproximate number of people in this audienceint
Oct 1st Breaking Change Notice: new field
data_source
JSON dictionary of type, sub_type, creation_params to indicate by which method the custom audience was createdJSON dictionary
Oct 1st Breaking Change Notice: new field
delivery_status
JSON dictionary of code and description. Indicates whether or not an audience can be used in ads. There are two situations that an audience will make ads not deliverable. First, if the size is smaller than 20 people, the audience can’t be delivered. Second, if for some reason the audience is disabled (such as violation of policy, expired), validation will fail when it is used in ads.JSON dictionary
lookalike_audience_idsThe IDs of the lookalike audiences generated from this audiencearray
lookalike_specGenerated only when the subtype is LOOKALIKE. More info at Lookalike Audiencearray
nameThe name of this audiencestring
parent_audience_id
Oct 1st Breaking Change Notice: This field will be removed
Parent audience IDlong
parent_category
Oct 1st Breaking Change Notice: This field will be removed
Type of the parent audience whether it is custom audience (e.g. Custom), partner category (e.g. Acxiom) or broad category (e.g. Activities)string
Oct 1st Breaking Change Notice: new field
permission_for_actions
JSON dictionary of permissions (string) to boolean value if the custom audience has that permissionJSON dictionary
Oct 1st Breaking Change Notice: new field
operation_status
JSON dictionary of code to int value and description to a description string. The operation status represents the status of the last operation performed on an audience. In general, it will have following states:
  • 200: Normal: there is no updating or issues found.
  • 300: Updating: there is an ongoing updating on the audience
  • 400: Warning: there is some message we would like advertisers to know
  • 410: No upload: no file has been uploaded
  • 411: Low match rate: low rate of matched people
  • 412: High invalid rate: high rate of invalid people
  • 421: No pixel: Your Custom Audience pixel hasn't been installed on your website yet
  • 422: Pixel not firing: Your Custom Audience pixel isn't firing
  • 423: Invalid pixel: Your Custom Audience pixel is invalid
  • 431: Audience refresh failed
  • 432: Audience build failed
  • 433: Audience build failed
  • 434: Audience build retrying
  • 500: Error: there is some error and advertisers need to take action items to fix the error
JSON dictionary
status
Oct 1st Breaking Change Notice: This field will be removed
Current status of the audience (e.g. ready, waiting, error)string
subtypeSubtype of the custom audience:
CUSTOM - custom audience
LOOKALIKE - lookalike audience
WEBSITE - custom audience from your website
APP - custom audience from your app
MANAGED - managed custom audience
PARTNER - partner category
other audience types returned are from custom audiences created in our interfaces
string
type
Oct 1st Breaking Change Notice: This field will be removed
Audience type (e.g. 4->custom audience, 6->broad categories)string
type_name
Oct 1st Breaking Change Notice: This field will be removed
Name of the audience type (e.g. Advertiser generated->custom audience, BCT->broad categories)string
time_updatedLast time this audience was updatedlong

By Custom Audience

To retrieve information about a particular custom audience, make an HTTP GET call to
 https://graph.facebook.com/{audience_id}?fields=<comma_separate_list_of_fields?
with the fields you wish to retrieve. Only id is returned by default once the "New Graph API framework conversion" migration is enabled. The response will be the same as when querying by ad account.

Update

To update the audience name, make an HTTP POST call to
 https://graph.facebook.com/{audienceid}
with the following fields:
nametypedescription
namestringnew name of the audience
descriptionstringnew description of the audience
opt_out_linkstringYour opt-out URL so people can choose not to be targeted
The response will be true if successful.
To update the list of people in the audience, you should add additional people or delete.

Delete

Deleting an Audience

To delete an Audience make an HTTP DELETE call to
https://graph.facebook.com/{audience_id}
with the field
nametypedescriptionrequired
force_delete_lookalikesboolForce deletion of lookalikes derived from the custom audienceNo

Deleting people from an Audience

To delete people from a custom audience make an HTTP DELETE call to
 https://graph.facebook.com/{audience_id}/users
with the same fields as Adding People to Audiences.

Sharing audiences

Sharing audiences is a restricted feature. Please contact your account manager for access.
You may also share audiences between ad accounts. To do so, make an HTTP POST to the follow endpoint
 https://graph.facebook.com/{audienceid}/adaccounts
with the following field:
namedescriptionexamplerequired
adaccountsArray of new ad account ID's to receive access to the custom audienceadaccounts=[1234, 2222]yes
You can also delete an ad account by specifying an HTTP DELETE to the same endpoint with the adaccounts field set to the ad account you want to remove access.
The destination account cannot modify the audience or use it as a seed audience to create lookalikes.

Using Custom Audiences in Targeting

Custom Audiences can be used alongside existing Broad Categories and can also take advantage of conjunctive AND targeting.
To do so, specify a custom_audiences field in your targeting spec.
targeting:{
  'countries':['US'],
  'user_adclusters':[{'id':6002714885172,'name':'Cooking'}],
  'custom_audiences':[{'id':6004192254512,'name':'customaudience'}]}

Exclusion Targeting

Advertisers can exclude a custom targeting audience from seeing an Ad or Sponsored Story by specifying an excluded_custom_audiences field in their targeting spec:
 targeting:{
      "countries":["US"],
      "age_min":25,
      "age_max":40,
      "excluded_custom_audiences":
        [{"id":"6004192254512","name":"customaudience"}],
  }

Opt-out

If a person has opted out of being targeted, you must remove the person from all custom audiences containing this person. To do so, you can send us the person and Facebook will delete them from all audiences that you own so that you don't have to remember which audience this person is a part of.
To opt-out a person from audience after they have clicked through to your opt-out URL, make an HTTP DELETE call to
 https://graph.facebook.com/act_{ad_account_id}/usersofanyaudience
with the same fields as Adding People to Audiences
This will remove the people you specify from ALL custom audiences belonging to the specified ad_account_id.

Hashing

Oct 1st Breaking Change Notice: The accepted method for hashing is SHA256. MD5 hashing will no longer be supported.
Before hashing the data make sure to normalize all the email addresses and phone numbers
  • Normalize Email addresses by trimming leading and trailing whitespace, and convert all characters to
case. Normalization function example (PHP):
trim(strtolower($email), " \t\r\n\0\x0B.");
  • Normalize phone numbers by removing any symbols, letters, and any leading zeroes.

SHA256 examples

Compute the SHA256 value for the normalized email address or phone number and use the hex representation of this value (using lowercase for A through F).
For example, the hash function in PHP converts the normalized email and phone number as follows
exampleresult
hash("sha256", "mary@example.com")f1904cf1a9d73a55fa5de0ac823c4403ded71afd4c3248d00bdcd0866552bb79
hash("sha256", "15559876543")1ef970831d7963307784fa8688e8fce101a15685d62aa765fed23f3a2c576a4e

Measurement

Atlas View Tags

Atlas view tags are supported on ads targeting custom audiences, partner categories, and lookalike audiences.
  • View tags from all approved providers are still allowed with exclusion targeting of custom audiences or lookalikes.
  • Other view tag providers are still blocked from adding view tags to ads targeting custom audiences, partner categories, and lookalike audiences.
In order to be used for measurement, view tags need to meet the above requirements, as well as those documented here.

Click Tags

Click tags from all approved providers are allowed with these targeting options.

Terms of Service

An advertiser must accept Custom Audience's terms of service in order to use the product. You can query which terms a given account accepted by checking the field tos_accepted of a given ad account. You can find more information at the ad account documentation.

Examples

Creating and adding people to a custom audience
// Create blank audience
curl \
-F "name=testAudience" \
-F "access_token=______" \
"https://graph.facebook.com/act_12345678/customaudiences"

// Add people
curl \
-F 'payload = { \ 
"schema":"EMAIL_SHA256", \
"data":["HASH", "HASH", "HASH"]}' \
-F "access_token=_____" \
"https://graph.facebook.com/6005123456/users"
To update the audience name
curl \
-F "name=testAudience" \
-F "access_token=___" \
https://graph.facebook.com/{audienceid}
To update the audience description
curl \
-F "description=testAudience new description" \
-F "access_token=___" \
https://graph.facebook.com/{audienceid}
Deleting people from a custom audience
// Deleting people
curl \
-X DELETE \
-F 'payload = { \ 
"schema":"EMAIL_SHA256", \
"data":["HASH", "HASH", "HASH"]}' \
-F "access_token=_____" \
"https://graph.facebook.com/<audienceid>/users"
To edit Opt-out link
curl \
-F "opt_out_link=http://www.yourdomain.com/optout" \
-F "access_token=___" \
https://graph.facebook.com/<audienceid>

Post a Comment

0 Comments