Title: How do I create a website Custom Audience from a custom event?
Tags: facebook-graph-api;facebook-php-sdk;facebook-marketing-api
Question: How I can add custom audience based on events like click anywhere in website page. 

I am planning to use 

```fbq('track', 'Purchase', {
 content_name: 'Really Fast Running Shoes',
 content_category: 'Apparel &amp; Accessories &gt; Shoes',
 content_ids: ['1234'],
 content_type: 'product',
 value: 199.50,
 currency: 'USD'
});
```

from

https://developers.facebook.com/docs/ads-for-websites/tag-api/. 

I have 2 confusions.


Is audience connected to ad account or custom audience?
Secondly, As pixel id is connected to ad account so my confusing is when I will track events on page using fbq then how it will be connected to specific custom audience?


Am I thinking in right or wrong way? Any suggestions?



Here is another answer: Accounts can have many Audiences. One type of Audience is Website Custom Audiences (WCA), which are based on pixel activity. Website Custom Audiences are groups of people that have taken actions resulting in pixel fires that match a certain rule, such as "made a Purchase". 

So when a pixel fires, Facebook checks for all the WCA (rules) on that pixel. If any of the rules match the data in the pixel, the person is added to the WCA that corresponds to the rule. A single pixel fire could add a person to more than one audience if multiple WCA rules matched the pixel event.

You can create a WCA based on your pixel by going to ```https://business.facebook.com/ads/manager/pixel/facebook_pixel/?act=[Account ID]``` and clicking the "Create Audience" button.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:11/22/16', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<facebook-graph-api><facebook-php-sdk><facebook-marketing-api>', 'Title': 'How do I create a website Custom Audience from a custom event?', 'ViewCount': 66, 'id': 40738182, 'user_AboutMe': '', 'user_AccountId': 6069755.0, 'user_DisplayName': 'Jass', 'user_Reputation': 2775.0, 'user_Views': 156.0, 'user_id': 4738959.0}}