➡️Data Export

The Data Export family of APIs enables exporting Spindl attribution data, for integration with internal systems and tools.

In addition to APIs, Spindl also supports custom data exports via S3. Please reach out if you are interested.

Pre-Attributed (Raw) Events

The Raw Events API provides access to all Spindl events that occurred within a specified a timeframe. This data provides a complete picture of all upstream and downstream events, and lets you build your own top-of-funnel tracking and downstream attribution models.

The API contains 4 types of events:

  • Link Redirects: These events represents someone clicking on a particular Spindl link. Each event provides a variety of extra metadata you might see on Google Analytics (like Country, Browser, and Referer).

  • Page Views: These events represent an SDK page view event. Each event provides a variety of extra metadata you might see on Google Analytics (like Country, Browser, Page, and Referer).

  • Wallet Connects: These events represent an SDK attribution event, which maps a Spindl identity with an on-chain Wallet. Because these events span both an off-chain event and an on-chain identity, we'll provide metadata you might see on Google Analytics (like Country, Browser, and Referer) and metadata you might see in a wallet explorer (like the total number of NFTs and an ENS domain).

  • Conversion Events: These events represent an on-chain action corresponding to your configured contract conversion events. These events will provide additional metadata you might see on a wallet explorer (like the total number of NFTs and an ENS domain).

This is essentially a dump of all touch points for a given user for your application. To attribute events (i.e. to determine if up-funnel event X led to downstream conversion event Y), you'll have to run the attribution yourself. Off-chain events (Link Redirects & Matches) can be joined with the identity field. On-chain events (Matches & Conversions) can be joined with the wallet field. If you want a global view of all your data inside Spindl, this is it. If you want attributed events, proceed to the next API call.

Get all Event Logs (Raw)

GET https://api.spindl.xyz/v1/data/events

Fetch all event logs within a given time period. This API will return all events within the time period, without any aggregation.

Events with always be descending chronologically (newest log events at the beginning of the list). The nextEndDate field can be used for pagination.

All event items include a unique identifier id. This can be used as a primary key (there will be no duplicates).

Query Parameters

Headers

{
  events: [
    {
      "id": "f9ab1570-59ab-41d2-8d87-50938cb84b4f",
      "event": "link_redirect",
      "identity": "spdl.1.1667204351264.f73be2e37ac9b03f",
      "timestamp": "2022-11-18T01:37:34.036Z",
      "link": {
        "id": "7eb378cb-ba4e-46da-8e7d-f478a82c0132",
        "name": "demo link 1",
        "link": "https://spindl.link/test"
      },
      "location": {
        "country": "United States",
        "region": "California"
      },
      "device": {
        "platform": "desktop",
        "os": "Mac OS",
        "osVersion": "10.15.7",
        "browser": "Chrome",
        "browserVersion": "107.0.0.0"
      },
      "referrer": {
        "referer": "https://t.co/"
      }
    },    
    {
      "id": "731ff78f-62ab-40ad-9c54-aa4bb370df59",
      "event": "page_view",
      "identity": "spdl.1.1667204351264.f73be2e37ac9b03f",
      "timestamp": "2022-11-22T18:51:51.937Z",      
      "location": {
        "country": "United States",
        "region": "California"
      },
      "device": {
        "platform": "desktop",
        "os": "Mac OS",
        "osVersion": "10.15.7",
        "browser": "Chrome",
        "browserVersion": "107.0.0.0"
      },
      "referrer": {},
      "page": {
        "url": "https://demo.dapp.com",
        "pathname": "/my-new-campaign",  
        "params": {
          "test": "true"
        }
      }
    },
    {
      "id": "2910aac2-1473-473f-8a71-dbe20c811909",
      "event": "wallet_connect",
      "walletAddress": "0xa8e47601d2325d4087e5d55c8a71fb65eb525ed7",
      "timestamp": "2022-11-18T01:37:35.464Z",
      "identity": "spdl.1.1667204351264.f73be2e37ac9b03f",
      "location": {
        "country": "United States",
        "region": "California"
      },
      "device": {
        "platform": "desktop",
        "os": "Mac OS",
        "osVersion": "10.15.7",
        "browser": "Chrome",
        "browserVersion": "107.0.0.0"
      },
      "referrer": {
        "utm_campaign": "blah",
        "referer": "https://t.co/"
      },
      "page": {
        "url": "https://demo.dapp.com",
        "pathname": "/my-new-campaign",  
        "params": {
          "test": "true"
        }
      }
    },
    {
      "id": "af0bafb6-e827-4a4e-892b-e621814185b0",
      "event": "contract_conversion",
      "walletAddress": "0xd9609ec767e3727b5d6df85a1b06b97ee7e931c7",
      "timestamp": "2022-11-17T08:34:23.000Z",
      "action": {
        "chainId": "1",
        "txHash": "0x37f5ec0e55d3645d916ab3a0e4e3008ab99e0fdd710ad4b62ff59006f899985d",
        "action": "safeTransferFrom"
      }
    }
  ],
  "nextEndDate": "2022-11-17T22:12:31.000Z"
}

Post-Attributed events

Available via S3 export. API coming soon.

Last updated