# Save page and campaign details with answers

Save page or campaign details with a website survey response. For example, record the product collection or whether an item was on sale. These details, called **metadata**, can help choose which survey appears and filter reports.

## Set the values on the storefront

Run this code before the embed loads. Use short, consistent keys so that a report can group responses from different pages.

```javascript
window.Shopoll ||= {};
window.Shopoll.metadata = {
  collection: 'Summer',
  discounted: false,
  campaign_group: 'Size guide'
};
```

On a storefront with client-side navigation, update the values for the new page and call `window.Shopoll.refresh()`. A response keeps the details supplied when the person started answering.

## Choose an audience

In the survey’s website audience rules, choose **Metadata**. Enter a key such as `collection` and match its value against `Summer`. Use automatic survey selection to apply the rule. A button that explicitly requests a survey ID chooses its audience in the storefront code.

## Find the properties in a response

Submit a test response and choose **Results**. Expand its metadata, or filter the report by a key and value. You can [edit response metadata](/surveys/edit-response-metadata.md) later. Use [participant metadata](/embed/participant-metadata.md) to identify a person across responses.

## Supported values

Shopoll accepts up to 25 flat properties. Keys begin with a letter and can contain letters, numbers, underscores or dashes, up to 64 characters. Strings, finite numbers and booleans are saved as text. Values are trimmed to 160 characters, with a combined encoding limit of 4 KB. Empty values, nested objects and arrays are ignored. Integration identifiers, participant identity fields and verified commerce fields are reserved.
