# Advanced Usage

## Observable Window Events

There are a few window events you may want to listen to in order to dynamically update your storefront.  Below is a list of available events.

### m-campaign\_cart\_updated

This event is emitted whenever token gated items are added to or removed from the cart.

## Token Checker Widget

<figure><img src="/files/3cQcnfL83XZ8BPEq2gLl" alt=""><figcaption><p>Allow collectors to check if a token has been redeemed on a campaign</p></figcaption></figure>

When a token is redeemed on a campaign, there is no change to the token's on chain metadata. So, we have included a widget that allows collectors to check if that token has already been used. \
\
It can be included by doing the following:

```
<div
   data-widget="m-token-checker"
   data-campaign-id="<your-campaign-id>"
></div>
```

## Token Set Gating

Token set gating is gating a product based on whether or not someone has a complete set of tokens.  This will only work via a snapshot and will require multiple steps, including minting tokens to Sepolia.  The following are instructions on how to do this in conjunction with [Manifold Studio](https://studio.manifold.xyz).

{% hint style="info" %}
We will be improving this feature in the future to make it more straightforward.
{% endhint %}

### Step 1: Determine all users that have a complete set

Using the [Snapshot Tool](/manifold-for-developers/tools-and-apis/snapshot-tool.md), take a snapshot of all holders of the relevant tokens.  Once you have this list, determine all the wallets that have the complete set, and the number of gated items you wish them to receive.

### Step 2: Create a Sepolia testnet token

Using [Manifold Studio](https://studio.manifold.xyz), create a Sepolia ERC1155 testnet token representing the complete set.  Choose an name, image and description that suits this.  Mint a token to yourself, and mint the token to all the addresses above in the quantities desired.  For further information on using Manifold Studio, [please see these docs](https://docs.manifold.xyz/v/manifold-studio/).

### Step 3: Create a Token gate using the Sepolia token

Configure a Product Gate using this token (snapshot based gate).  This will gated access to the product to all the wallets you sent the Sepolia token to in step 2.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.manifold.xyz/manifold-for-developers/shopify-merch-bridge/reference/advanced-usage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
