Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.autoplay.ai/llms.txt

Use this file to discover all available pages before exploring further.

Streaming every user click to Autoplay via FullStory Streams

This tutorial sets up a FullStory Stream that fires a webhook to the Autoplay SDK every time a user clicks anything in your product — capturing what they clicked, when, and on which page. Everything is configured inside the FullStory dashboard. No code changes to your frontend are required.

Prerequisites

Before starting, confirm the following:
  • FullStory is already installed and capturing sessions in your product. Verify by running FS('getSession', { format: 'id' }) in the browser console — if it returns a string, capture is active.
  • Anywhere: Activation is included in your FullStory plan. Streams is available on Enterprise and Advanced plans. Check under Settings → Anywhere → Activation — if the menu item is missing, confirm your plan tier with your FullStory account manager.
  • You have Admin or Architect role in FullStory. Required to create and manage Streams.
  • You have your Autoplay ingest endpoint URL and auth token. You’ll enter these into the Stream destination in Step 2. Retrieve them from the Autoplay dashboard.
  • Check your Activation Quota before going live. Single-event Streams consume 1/100th of an Activation per trigger. At high click volumes this quota can be significant — confirm your limit with your FullStory account manager. See the Activation Quota docs.

Step 1 — Navigate to Streams

In the FullStory dashboard:
Settings → Anywhere → Activation → Create Stream
Give the Stream a name and description that makes it easy to identify later:
  • Name: autoplay-every-click
  • Description: Streams every user click event to the Autoplay SDK — captures target text, page URL, and timestamp.

Step 2 — Configure the destination

This tells FullStory where to POST the data. Set it up as follows:
FieldValue
Destination typeHTTP Endpoint
Request MethodPOST
API Endpoint URLYour Autoplay ingest URL
AuthenticationBearer token (or whichever auth Autoplay requires)
Click Create connection, select your authentication type, and enter the credentials. Once saved, this connection can be reused for any additional Streams you create later.
Get the Autoplay ingest endpoint URL and auth token from the Autoplay SDK setup guide: https://developers.autoplay.ai/recipes/intercom-tutorial

Step 3 — Define the trigger

This is what causes the Stream to fire. You want it to fire on every single click, across every page, for every user.
  1. Under Definition, click Select an event
  2. Choose Element Clicked
  3. Do not add any dependent criteria or filters — leaving it empty means it matches every click, not just clicks on specific elements
  4. Under How often should the definition match? select On every event
“On every event” is critical here. The alternative — “Once per session” — would only fire once per user session regardless of how many times they click. You want Autoplay to receive a signal for every individual click.
The definition should look like this when complete:
Event:     Element Clicked
Filters:   (none)
Frequency: On every event

Step 4 — Configure the field mapping

This defines exactly what data gets sent to Autoplay in each webhook payload. Switch to the JSON view in the Field Mapping section and paste the following:
{
  "target_text":   ["var", "event.0.target_text"],
  "element_name":  ["var", "event.0.element_name"],
  "page_url":      ["var", "event.0.url"],
  "timestamp":     ["var", "event.0.event_time"],
  "timestamp_unix": ["toUnixTimestamp", ["var", "event.0.event_time"]],
  "session_replay_url": ["var", "event.0.app_url_event"],
  "user_id":       ["var", "event.0.user_id"],
  "user_email":    ["var", "event.0.user_email"],
  "session_id": [
    "concat",
    ["var", "event.0.device_id"],
    "%3A",
    ["var", "event.0.session_id"]
  ]
}

What each field captures

FieldFullStory sourceWhat it tells Autoplay
target_textevent.0.target_textThe visible text of the element clicked — e.g. "Export CSV", "Save changes". This is the primary signal for the LLM to understand intent.
element_nameevent.0.element_nameThe name FullStory assigns to the element — useful when target_text is empty (e.g. icon buttons).
page_urlevent.0.urlThe full URL of the page where the click happened.
timestampevent.0.event_timeISO 8601 UTC timestamp of when the click occurred — e.g. "2025-10-21T14:17:34.073Z".
timestamp_unixconverted from event_timeUnix timestamp version — easier to sort and compare programmatically.
session_replay_urlevent.0.app_url_eventA deep link that opens the FullStory session replay at the exact moment this click happened. Invaluable for debugging.
user_idevent.0.user_idThe user ID from your system, if setIdentity has been called. Links the click to a known user.
user_emailevent.0.user_emailThe user’s email, if provided via setIdentity.
session_iddevice_id + session_id concatenatedThe composite {device_id}:{session_id} format required by the FullStory Server API. Pass this value when calling the Sessions API or when keying Autoplay’s context store.
Why target_text and element_name together? target_text captures the visible label on the element — the text the user sees. element_name is the name FullStory uses internally, which is often derived from aria-label, id, or element attributes when there’s no visible text. Sending both means Autoplay always has a readable identifier even for icon-only buttons or inputs.
Why session_replay_url using app_url_event and not app_url_session? The app_url_event field deep-links to this specific click in the recording, not just the start of the session. Every payload Autoplay receives has a one-click path to the exact frame where that click happened.

Step 5 — Send a test and verify

Before saving, use the built-in Send Test feature to confirm the connection is working:
  1. Click Send Test
  2. Under Request, review the sample payload — check the field names match what you configured
  3. Under Server Response, confirm you see 200 OK
If the test returns an error:
  • Double-check the Autoplay endpoint URL for typos
  • Confirm the auth token is correct and hasn’t expired
  • Make sure Autoplay’s endpoint accepts POST requests with Content-Type: application/json

Step 6 — Save and activate

Click Save. The Stream is now live. Every time any user clicks anything in the product, FullStory will POST a webhook to Autoplay within a few seconds of the click occurring. The payload will contain the clicked element text, the page URL, and the timestamp.

What the payload looks like

Here is an example of what Autoplay receives for each click:
{
  "target_text":        "Export CSV",
  "element_name":       "Export button",
  "page_url":           "https://app.example.com/reports",
  "timestamp":          "2025-10-21T14:17:34.073Z",
  "timestamp_unix":     1761056254,
  "session_replay_url": "https://app.fullstory.com/ui/YOURORG/client-session/abc123?ts=1761056254000",
  "user_id":            "user-462718483",
  "user_email":         "jane@example.com",
  "session_id":         "3350978756809951428%3A8226444501427639735"
}

Verifying clicks are flowing

To confirm end-to-end after saving the Stream:
  1. Open your product in a browser and click around on several elements
  2. In FullStory, go to Settings → Anywhere → Activation and open the autoplay-every-click Stream — you should see recent activity in the event log
  3. Check your Autoplay event log to confirm payloads are arriving with the correct target_text and page_url values
If target_text is empty for some clicks: This means the user clicked an element with no visible text — for example, an icon button or an image. In these cases fall back to element_name, which FullStory derives from accessibility attributes. If both are empty, the element has no accessible label and may be worth fixing in the product regardless.

Rate limits and delivery

FullStory does not rate limit outbound Streams. However, your Autoplay endpoint needs to be sized appropriately. If your FullStory account captures 50 sessions per second and every session has frequent clicks, your endpoint could receive a high volume of requests. FullStory will retry failed requests up to 30 times over 5 hours if your endpoint returns a 5xx response or times out. FullStory sends Stream requests from the following IP addresses — whitelist these on your Autoplay endpoint if needed:
  • US region: 8.35.195.0/29
  • EU region: 34.89.210.80/29
Latency in disconnected scenarios: FullStory sends events on a best-effort basis. In poor or intermittent network conditions, events may arrive minutes after the click occurred. Design your Autoplay context endpoint to return an empty/default response gracefully when no recent events exist for a session — do not assume context is always present when the chat widget opens.

References