Connect your Snap Pixel
Attach a Pixel ID and Conversions API token to your Smart Link’s tracking setup.
See what Smart Links handles for you, compared with building a direct Snap Conversions API integration.
Fans APISmart Links | SnapchatConversions API · Direct |
|---|---|
Click attributionCapture the Snapchat click ID through your Smart Link. | Click attributionPass the click ID or landing-page URL in your event payload. |
Event mappingChoose or disable event mappings in pixel settings. | Event mappingMap your app’s actions to Snapchat event names in code. |
Event deliveryForward configured Smart Link events to Snapchat. | Event deliveryBuild and send the server-to-server event requests. |
Testing & troubleshootingSend a test from settings and inspect pixel event logs. | Testing & troubleshootingUse Snap’s validation endpoints and Events Manager. |
Link-level reportingRead clicks, subscribers and revenue from one stats API. | Link-level reportingBuild your link-level reporting alongside the event integration. |
Both approaches need a Snap Pixel ID and an access token. Your ad campaigns stay in Snapchat Ads Manager.
Configure the connection once, then follow the events that matter to your campaign.
Add your Snap Pixel ID and Conversions API token in Smart Links → Tracking Pixels.
Select the pixel, choose your event mappings and use the Smart Link as your ad’s destination.
Send a test event. Inspect delivery in the event logs and read your Smart Link’s performance through the API.
A closer look at the Snapchat integration, from connection to reporting.
Attach a Pixel ID and Conversions API token to your Smart Link’s tracking setup.
Smart Links captures Snapchat’s ScCid click ID for attribution. No URL macro to add.
Map each action to a standard or custom Snapchat event, or turn individual events off.
Query clicks, subscribers, revenue and spenders, with daily and monthly metrics.
Send a test event from your pixel settings and check it in Snapchat Events Manager.
Use pixel event logs to investigate rejected payloads, credentials and delivery failures.
const response = await fetch(
`https://app.onlyfansapi.com/api/smart-links/${process.env.SMART_LINK_ID}/stats`,
{ headers: {
Authorization: `Bearer ${process.env.FANSAPI_API_KEY}`,
Accept: "application/json"
}}
);
const { data } = await response.json();
console.log(data.summary);import os
import requests
response = requests.get(
f"https://app.onlyfansapi.com/api/smart-links/{os.environ['SMART_LINK_ID']}/stats",
headers={
"Authorization": f"Bearer {os.environ['FANSAPI_API_KEY']}",
"Accept": "application/json",
},
timeout=30,
)
print(response.json()["data"]["summary"])<?php
$linkId = getenv('SMART_LINK_ID');
$apiKey = getenv('FANSAPI_API_KEY');
$curl = curl_init("https://app.onlyfansapi.com/api/smart-links/$linkId/stats");
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $apiKey",
"Accept: application/json",
],
]);
$response = curl_exec($curl);
$data = json_decode($response, true, 512, JSON_THROW_ON_ERROR);
print_r($data['data']['summary']);
curl_close($curl);require "net/http"
require "json"
uri = URI("https://app.onlyfansapi.com/api/smart-links/#{ENV.fetch('SMART_LINK_ID')}/stats")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch('FANSAPI_API_KEY')}"
request["Accept"] = "application/json"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true,
open_timeout: 10, read_timeout: 30) { |http| http.request(request) }
puts JSON.parse(response.body).fetch("data").fetch("summary")import java.net.URI;
import java.net.http.*;
import java.time.Duration;
public class SmartLinkStats {
public static void main(String[] args) throws Exception {
String linkId = System.getenv("SMART_LINK_ID");
String apiKey = System.getenv("FANSAPI_API_KEY");
var request = HttpRequest.newBuilder()
.uri(URI.create("https://app.onlyfansapi.com/api/smart-links/" + linkId + "/stats"))
.timeout(Duration.ofSeconds(30))
.header("Authorization", "Bearer " + apiKey)
.header("Accept", "application/json")
.GET().build();
var response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}curl --fail-with-body \
"https://app.onlyfansapi.com/api/smart-links/$SMART_LINK_ID/stats" \
-H "Authorization: Bearer $FANSAPI_API_KEY" \
-H "Accept: application/json"/api/smart-links/{smart_link_id}/statsStart with the default mappings, then choose which events your pixel sends.
| Smart Link action | Snapchat event | When it happens |
|---|---|---|
| Link click | VIEW_CONTENT | A fan clicks the Smart Link. |
| New subscriber | SIGN_UP | A fan subscribes through the link. |
| First purchase | PURCHASE | The first transaction other than the initial subscription payment. |
| Repeat purchase | PURCHASE | Other transactions, including the initial subscription payment. |
| Third inbound message | LEVEL_COMPLETE | A converted fan reaches their third inbound message. |
Each mapping can be changed or disabled in your pixel’s Event Configuration.
Prepare your account and credentials, then choose the plan that fits your workflow.
An active account with Smart Links enabled and a connected account for the campaign.
Business Manager access. Organization Admin permissions are needed to generate the API token.
Use credentials from the same organization. Keep tokens on your backend.
The essentials before your first request.