Skip to main content
images/morf.svg The Generate Track Url action creates browser-friendly URLs that trigger Track events when accessed. This enables triggering Morf analytics events through simple HTTP GET requests, making it ideal for email links, embedded buttons, or any scenario where you need to track user interactions via URL clicks.

How It Works

When a browser visits the generated URL:
  1. Browser Request: A user clicks the generated URL or their browser navigates to it
  2. Track Event Processing: Morf decodes the embedded track data and processes the analytics event
  3. Response: The browser receives either:
    • A custom success page (if Success Text was provided)
    • A JSON response (if no Success Text was provided)
The generated URL contains encoded track event data that gets processed through Morf’s standard Track API endpoint when accessed.

Use Cases

  • Email Marketing: Track email click-through events by embedding tracking URLs in email content
  • Social Media: Monitor engagement from social media posts and campaigns
  • Web Analytics: Track button clicks, form submissions, or other user interactions
  • Customer Journeys: Capture touchpoints across different platforms and channels

Parameters

Action
Parameters
{
  "$result_object_key": {
    "track_data": "A serialized morf_analytics.v1.Track protobuf message",
    "url": "https://api.morf.healthcare/v1/track/link/d2aae7a5-b3b0-4bee-991b-695d501c91e5?success_text=hello%20world&track_data=ChQKEmpvaW4tYnV0dG9uLWNsaWNrZWQSJGQyYWFlN2E1LWIzYjAtNGJlZS05OTFiLTY5NWQ1MDFjOTFlNRo%3D"
  }
}
{
  "$result_object_key": {
    "track_data": {
      "event_data": "(Optional) Data associated with the event, *not* automatically stored on the Morf Profile",
      "event_id": "(Optional) Unique identifier for the event (e.g. a UUID)",
      "event_name": "(Required) Event name",
      "occurred_at": "(Optional) Time the event occurred, if not provided - the time Morf receives the track event (RFC3339 ISO Format)",
      "profile_ids": {
        "active_campaign": "(Optional) An Active Campaign Contact ID",
        "athena": "(Optional) An Athena Patient ID",
        "axle_health": "(Optional) An Axle Health Patient ID",
        "boulevard": "(Optional) A Boulevard Client ID",
        "butterfly_labs": "(Optional) A Butterfly Labs Patient ID",
        "customer": "(Optional) Any unique identifier in your organization",
        "customer_io": "(Optional) A Customer.io Customer ID",
        "elation": "(Optional) An Elation Patient ID",
        "feathery": "(Optional) A user ID for a Feathery flow",
        "formsort": "(Optional) A responder UUID for a Formsort flow",
        "freshdesk": "(Optional) A Freshdesk Contact ID",
        "healthie": "(Optional) A Healthie User (Patient) ID",
        "hubspot": "(Optional) A Hubspot Contact ID",
        "intakeq": "(Optional) An IntakeQ Patient ID",
        "intercom": "(Optional) An Intercom Contact ID",
        "junction": "(Optional) A Junction Patient ID",
        "medplum": "(Optional) A Medplum Patient ID",
        "nextech": "(Optional) A Nextech Patient ID",
        "open_phone": "(Optional) An OpenPhone Contact ID",
        "posthog": "(Optional) A PostHog Person ID",
        "recurly": "(Optional) A Recurly Subscriber ID",
        "sana_benefits": "(Optional) A Sana Benefits Patient ID",
        "segment": "(Optional) A Segment Anonymous- or User- ID",
        "spruce": "(Optional) A Spruce Contact ID",
        "stripe": "(Optional) A Stripe Customer ID",
        "zoho": "(Optional) A Zoho Contact ID"
      },
      "profile_properties": "(Optional) Property values to store on the Morf Profile",
      "source_id": null,
      "user_id": "(Required) Unique user ID. Note: this value will be stored as the active customer ID"
    },
    "url": "The url-encoded track event URL which when a browser request is made to will trigger the track event to fire in Morf"
  }
}

Result Object Field Details

You can use the result of the action’s data as inputs to downstream workflow actions. Each fetch action requires a result object key to be specified which will nest the action’s result data inside the downstream data context in the Workflow. Here we demonstrate how to refer to this data using the prefix $result_object_key.
GenerateTrackUrlResult
Fetch Action Response Object