Superfiliate

Partners API

Attribution

Install the storefront script on a custom storefront, or skip it on Shopify.

Shopify stores

If the store runs on Shopify, Superfiliate already keeps the tracking script connected. There is nothing to paste. Settings → Developers shows Attribution script as managed by the Shopify app.

Custom storefronts

On a custom commerce store, add the shop-specific script to every page so attributed visits and orders are recorded. Copy it from Settings → Developers, or fetch it from the API.

  1. 1

    Copy the script tag

    In the Superfiliate app, open Settings → Developers and the Attribution script tab. Copy the script tag. It looks like this, with your shop identifier in the query string:

    Script taghtml
    <script defer src="https://superfiliate-cdn.com/storefront.js?shop=commerce-store"></script>
  2. 2

    Place it in the document head

    Add the tag to every storefront page, before the closing </head>. Compatible updates are delivered through the same URL — you do not need to replace the tag when the script version changes.

  3. 3

    Verify tracking

    Visit an attributed Superfiliate link, then check the same Developers tab. Status moves from waiting for events, to active once a storefront event arrives.

Fetch the tag from the API

Automate installation with the Get attribution installation endpoint. It requires the attribution.read scope.

Get attribution installationbash
curl "https://api.superfiliate.com/api/v1/attribution" \
  -H "Authorization: Bearer $SF_CLIENT_ID:$SF_CLIENT_SECRET"

A healthy response:

Response · 200 OKjson
{
  "scriptTag": "<script defer src=\"https://superfiliate-cdn.com/storefront.js?shop=commerce-store\"></script>",
  "version": "1"
}
  • scriptTag is the HTML to inject.
  • version is the installation contract. Compatible script updates keep the same tag.