> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heyoo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# campaign.clicked

> Occurs when a campaign receives a click.

export const WebhookResponseBodyParameters = ({type, children}) => <div>
    <h2>Response body parameters</h2>
    <p>
      All webhook payloads follow a consistent top-level structure with
      event-specific data nested within the <code>data</code> object.
    </p>
    <ParamField body="id" type="string">
      The event ID.
    </ParamField>
    <ParamField body="event" type="string">
      The event type that triggered the webhook (e.g., <code>{type}</code>).
    </ParamField>
    <ParamField body="timestamp" type="string">
      ISO 8601 timestamp when the webhook event was triggered.
    </ParamField>
    <ParamField body="data" type="object">
      Event-specific data containing detailed information about the event. The
      data object for the <code>{type}</code> event contains the following
      parameters:
      <Expandable defaultOpen title="object parameters">
        {children}
      </Expandable>
    </ParamField>
  </div>;

The `campaign.clicked` event is triggered when a user clicks on a shared campaign link. The payload includes details about the click, the campaign, and the sharer.

<WebhookResponseBodyParameters type="campaign.clicked">
  <ParamField body="click" type="object" required>
    <Expandable title="properties">
      <ParamField body="id" type="string" required>
        The unique ID of the click.
      </ParamField>

      <ParamField body="timestamp" type="string" required>
        ISO 8601 timestamp of the click.
      </ParamField>

      <ParamField body="url" type="string" required>
        The URL that was clicked.
      </ParamField>

      <ParamField body="country" type="string">
        Country of the user.
      </ParamField>

      <ParamField body="city" type="string">
        City of the user.
      </ParamField>

      <ParamField body="region" type="string">
        Region/State of the user.
      </ParamField>

      <ParamField body="continent" type="string">
        Continent of the user.
      </ParamField>

      <ParamField body="device" type="string">
        Device type (e.g., mobile, desktop).
      </ParamField>

      <ParamField body="browser" type="string">
        Browser used (e.g., Chrome, Safari).
      </ParamField>

      <ParamField body="os" type="string">
        Operating system of the device.
      </ParamField>

      <ParamField body="referer" type="string">
        Referer string (e.g. `linkedin.com`).
      </ParamField>

      <ParamField body="refererUrl" type="string">
        Full referer URL.
      </ParamField>

      <ParamField body="qr" type="boolean" required>
        Whether the click came from a QR code.
      </ParamField>

      <ParamField body="ip" type="string">
        IP address of the click.
      </ParamField>
    </Expandable>
  </ParamField>

  <ParamField body="campaign" type="object" required>
    Details about the campaign that was clicked.

    <Expandable title="properties">
      <ParamField body="id" type="string" required>
        The unique ID of the campaign.
      </ParamField>

      <ParamField body="name" type="string" required>
        The name of the campaign.
      </ParamField>

      <ParamField body="objective" type="string" required>
        The objective of the campaign (e.g., `increase_awareness`).
      </ParamField>

      <ParamField body="description" type="string" required>
        A description of the campaign payload.
      </ParamField>

      <ParamField body="domain" type="string" required>
        The domain associated with the campaign.
      </ParamField>

      <ParamField body="destinationUrl" type="string" required>
        The destination URL where clicks should be redirected.
      </ParamField>

      <ParamField body="utm_source" type="string">
        The UTM source parameter.
      </ParamField>

      <ParamField body="utm_medium" type="string">
        The UTM medium parameter.
      </ParamField>

      <ParamField body="utm_campaign" type="string">
        The UTM campaign parameter.
      </ParamField>

      <ParamField body="utm_term" type="string">
        The UTM term parameter.
      </ParamField>

      <ParamField body="utm_content" type="string">
        The UTM content parameter.
      </ParamField>

      <ParamField body="ref" type="string">
        Referral identifier.
      </ParamField>

      <ParamField body="clicks" type="integer" required>
        Number of clicks received.
      </ParamField>

      <ParamField body="shares" type="integer" required>
        Number of shares.
      </ParamField>

      <ParamField body="targetShares" type="integer">
        Target number of shares.
      </ParamField>

      <ParamField body="startDate" type="string" required>
        Campaign start date.
      </ParamField>

      <ParamField body="endDate" type="string" required>
        Campaign end date.
      </ParamField>

      <ParamField body="shareRewardAmount" type="number" required>
        Reward amount per share.
      </ParamField>

      <ParamField body="clickRewardAmount" type="number" required>
        Reward amount per click.
      </ParamField>

      <ParamField body="rewardType" type="string" required>
        Type of reward given.
      </ParamField>

      <ParamField body="maxRewardPerEmployee" type="number">
        Maximum reward per employee.
      </ParamField>

      <ParamField body="totalBudget" type="number">
        Total budget allocated to the campaign.
      </ParamField>

      <ParamField body="consumedBudget" type="number" required>
        Budget consumed so far.
      </ParamField>

      <ParamField body="minimumClicksForReward" type="integer">
        Minimum clicks required for a reward.
      </ParamField>

      <ParamField body="uniqueClicksOnly" type="boolean">
        Whether only unique clicks are rewarded.
      </ParamField>

      <ParamField body="status" type="string" required>
        Current status of the campaign.
      </ParamField>

      <ParamField body="creatorId" type="string" required>
        The unique ID of the user who created the campaign.
      </ParamField>

      <ParamField body="workspaceId" type="string" required>
        The unique ID of the workspace.
      </ParamField>

      <ParamField body="workspaceSlug" type="string" required>
        The slug of the workspace.
      </ParamField>

      <ParamField body="contentPillarName" type="string">
        The content pillar name.
      </ParamField>

      <ParamField body="createdAt" type="string" required>
        ISO 8601 timestamp when the campaign was created.
      </ParamField>

      <ParamField body="updatedAt" type="string" required>
        ISO 8601 timestamp when the campaign was last updated.
      </ParamField>
    </Expandable>
  </ParamField>

  <ParamField body="sharer" type="object" required>
    The user who shared the link that resulted in this click.

    <Expandable title="properties">
      <ParamField body="id" type="string" required>
        The unique ID of the user.
      </ParamField>

      <ParamField body="name" type="string">
        The name of the user.
      </ParamField>

      <ParamField body="email" type="string" required>
        The email address of the user.
      </ParamField>
    </Expandable>
  </ParamField>
</WebhookResponseBodyParameters>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "evt_...",
    "event": "campaign.clicked",
    "timestamp": "2024-08-26T16:41:52.346Z",
    "data": {
      "click": {
        "id": "clk_...",
        "timestamp": "2024-08-26T16:41:52.346Z",
        "url": "https://heyoo.ai/summer?ref=...",
        "country": "US",
        "city": "San Francisco",
        "region": "CA",
        "continent": "NA",
        "device": "mobile",
        "browser": "Chrome",
        "os": "iOS",
        "referer": "linkedin.com",
        "refererUrl": "https://www.linkedin.com/",
        "qr": false,
        "ip": "192.168.1.1"
      },
      "campaign": {
        "id": "cm11...",
        "name": "Summer Referral Push",
        "shareContext": "Check out this amazing opportunity!",
        "objective": "increase_awareness",
        "description": "Our main summer campaign",
        "domain": "heyoo.ai",
        "destinationUrl": "https://heyoo.ai/summer",
        "utm_source": "heyoo",
        "utm_medium": "referral",
        "utm_campaign": "summer_2024",
        "utm_term": null,
        "utm_content": null,
        "ref": null,
        "clicks": 1,
        "shares": 10,
        "targetShares": 100,
        "startDate": "2024-06-01T00:00:00.000Z",
        "endDate": "2024-08-31T23:59:59.999Z",
        "shareRewardAmount": 10,
        "clickRewardAmount": 1,
        "rewardType": "points",
        "maxRewardPerEmployee": 500,
        "totalBudget": 5000,
        "consumedBudget": 0,
        "minimumClicksForReward": 5,
        "uniqueClicksOnly": true,
        "status": "active",
        "creatorId": "usr_...",
        "workspaceId": "ws_...",
        "workspaceSlug": "acme",
        "contentPillarName": "Promotions",
        "createdAt": "2024-08-26T16:40:00.000Z",
        "updatedAt": "2024-08-26T17:00:00.000Z"
      },
      "sharer": {
        "id": "usr_...",
        "name": "John Doe",
        "email": "john@example.com"
      }
    }
  }
  ```
</ResponseExample>
