# Click Tracking Setup

Create a click tracking rule from start to finish.

## Scenario

Track clicks on a "Download Whitepaper" button. Send data to Adobe Analytics with:

* Page name in eVar5
* Page URL in eVar6
* "download whitepaper" in eVar7
* Event11 and Event12

## Steps

### 1. Capture the Element

1. Navigate to the page with the button
2. Right-click the download button
3. Select **Capture Element for Ivory**

### 2. Create the Rule

Click **Create** and enter:

```
Create a click tracking rule for the captured download button.
Set eVar5 to page name, eVar6 to page URL, eVar7 to "download whitepaper".
Fire event11 and event12.
Send an Analytics beacon with link name "download whitepaper".
Clear variables after the beacon.
```

### 3. Review Components

Ivory generates:

| Component       | Type   | Purpose                  |
| --------------- | ------ | ------------------------ |
| Click event     | Event  | Triggers on button click |
| Set Variables   | Action | Sets eVars and events    |
| Send Beacon     | Action | Sends data to Analytics  |
| Clear Variables | Action | Resets variables         |

Review each component. Approve or deny as needed.

### 4. Verify in Adobe Tags

Click the result link to open the rule in Adobe Tags. Confirm:

* Event has correct selector
* Variables are set correctly
* Beacon fires as expected

## Variations

**Add path condition:**

```
...only fire on pages with /resources in the path
```

**Track multiple buttons:**

```
Create click tracking rules for:
- Download whitepaper button
- Contact sales button
- Request demo button
Each with appropriate eVar7 values
```


---

# 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://ivory-docs.gitbook.io/ivory/how-to-guides/click-tracking.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.
