Passing Campaign Data via Popin & Webhook Meta

Passing Campaign Data via Popin & Webhook Meta

Popin supports passing campaign and tracking data (such as UTM parameters and custom identifiers) when opening the widget.

This data is automatically included in webhook payloads under the properties.meta object, ensuring consistency across all events.


1. Passing Campaign Data

You can attach campaign details when opening Popin using the campaign object:

Popin('open', {
  campaign: {
    utm_source: "google",
    utm_medium: "cpc",
    utm_campaign: "summer_sale",
    utm_term: "buy+hotel+rooms",
    utm_content: "banner_ad_1"
  }
});

2. Supported Fields

Key Type Description
utm_source string Identifies the traffic source (e.g., google, facebook).
utm_medium string Identifies the medium (e.g., cpc, email, referral).
utm_campaign string Campaign name (e.g., summer_sale).
utm_term string Paid keyword or search term.
utm_content string Differentiates ads/content (e.g., banner_ad_1).
Custom fields any Additional keys are supported (e.g., partner_id, creative_id).

3. Example with Custom Data

You can also include custom identifiers such as partner_id or creative_id:

Popin('open', {
  campaign: {
    utm_source: "linkedin",
    utm_medium: "social",
    utm_campaign: "b2b_launch",
    partner_id: "12345",
    creative_id: "banner_blue"
  }
});

4. Webhook Delivery

All campaign data is mapped into the properties.meta object of webhook payloads.

Example Payload (popin_user_captured)

{
  "event": "popin_user_captured",
  "user_id": "3ab7634bb5f3a7544fd16ca0e5107b07",
  "email": null,
  "country_code": "+91",
  "phone_number": "9792521396",
  "full_phone_number": "+919792521396",
  "properties": {
    "customer_name": "Anubhav Jaiswal",
    "customer_email": null,
    "customer_country_code": "+91",
    "customer_phone_number": "9792521396",
    "url": "https://meralda.scalenext.io/product-detail/estelle-clover-baguette-ring",
    "product": "Estelle Clover Baguette Ring",
    "meta": {
      "utm_source": "google",
      "utm_medium": "cpc",
      "utm_campaign": "summer_sale",
      "utm_term": "buy+hotel+rooms",
      "utm_content": "banner_ad_1"
    }
  },
  "timestamp": "2025-09-17T14:41:02+00:00"
}

5. Notes

  • All campaign parameters passed to Popin('open', { campaign: {...} }) are forwarded into properties.meta.

  • Custom keys (e.g., partner_id, creative_id) are supported and appear under meta.

  • This mapping is consistent across all webhook events, such as:

    • popin_user_captured

    • popin_call_successful

    • popin_call_rated

  • If no campaign data is passed, the meta object will still exist but may be empty.


    • Related Articles

    • Streamline Customer Calls by Passing Logged-in User Data to Popin

      Enhance Your Customer Experience with Pre-filled Data We understand that a seamless user experience is crucial when it comes to customer interactions. To make video calls with your agents even more effortless, Popin allows you to pass logged-in user ...
    • Popin Webhook Integration Guide

      Overview Popin's webhook functionality allows you to receive real-time notifications about events happening in your Popin widget. This guide explains how to set up webhooks and describes the event payloads you can expect to receive. Setting Up ...
    • Passing Logged-In Customer Details to Popin

      This guide explains how to automatically pass logged-in customer data to the Popin widget. This ensures a seamless experience by skipping the manual data entry step and directly opening the widget. ? When to Use This Use this method if: The user is ...
    • Popin Zapier Integration Guide

      Popin Zapier App Integration Overview The Popin Zapier App enables you to integrate Popin with thousands of other applications through Zapier. This guide provides instructions on how to connect Popin to Zapier, configure triggers, and use API ...
    • How do I track live call data in Popin Dashboard?

      1. Accessing Call Data on Dashboard * Navigate to the calls tab on the dashboard. * Find essential data such as calls, missed calls, abandoned calls, and call success rate. 2. Viewing Live Calls * Live calls are displayed, including a watch icon for ...