v3

OpenAPI 3.1.1mit2026-07-3165481.5 MB
Web Visits
v1

Retrieve Web Visits Tracker Script

Retrieve the tracking script for the given account. The response includes the script hash and a ready-to-use HTML snippet to embed on your website to enable visitor tracking.

:::info Requires the web_visits:read OAuth2 scope. :::

get/v1/web-visits/tracker

Query parameters

account_idstring required

The Leadfeeder Account ID. The Account ID can be retrieved using the List Accounts endpoint.

Response

Success

Example response

{
  "data": {
    "type": "web_visits_tracker_script",
    "id": "abc123def456",
    "attributes": {
      "timezone": "Europe/Helsinki",
      "script": {
        "hash": "a1b2c3d4e5f6",
        "html": "<script>(function(ss,ex){ window.ldfdr=window.ldfdr||function(){(ldfdr._q=ldfdr._q||[]).push([].slice.call(arguments));}; (function(d,s){ fs=d.getElementsByTagName(s)[0]; function ce(src){ var cs=d.createElement(s); cs.src=src; cs.async=1; fs.parentNode.insertBefore(cs,fs); }; ce('https://sc.lfeeder.com/lftracker_v1_'+ss+(ex?'_'+ex:'')+'.js'); })(document,'script'); })('a1b2c3d4e5f6');</script>"
      }
    }
  },
  "meta": {
    "request_id": "cf054205-dd8c-4473-8689-07c30fe0789f"
  }
}