Records the first touch (write-once) and the owner's answer or skip.
PUT
/account/attribution
const url = 'https://api.siteqwality.com/account/attribution';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"first_touch":{"source":"example","medium":"example","campaign":"example","referrer_host":"example","landing_host":"example","landing_path":"example","touched_at":"example"},"self_reported":{"channel":"example","detail":"example"},"skipped":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.siteqwality.com/account/attribution \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "first_touch": { "source": "example", "medium": "example", "campaign": "example", "referrer_host": "example", "landing_host": "example", "landing_path": "example", "touched_at": "example" }, "self_reported": { "channel": "example", "detail": "example" }, "skipped": true }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
Every field is optional and unknown fields are ignored. Text is trimmed, stripped of control characters and cut to its cap; an empty value is absent.
object
first_touch
One of:
Write-once: fills only the columns that are still empty.
object
source
At most 64 characters, as are medium and campaign.
string | null
medium
string | null
campaign
string | null
referrer_host
Host only, at most 100 characters, as is landing_host.
string | null
landing_host
string | null
landing_path
Path only, no query or hash, at most 160 characters.
string | null
touched_at
RFC 3339. Dropped when unparseable, over 120 days old or more than a day ahead.
string | null
null
self_reported
skipped
Records a skip unless an answer exists. Not combinable with self_reported.
boolean | null
Example generated
{ "first_touch": { "source": "example", "medium": "example", "campaign": "example", "referrer_host": "example", "landing_host": "example", "landing_path": "example", "touched_at": "example" }, "self_reported": { "channel": "example", "detail": "example" }, "skipped": true}Responses
Section titled “ Responses ”Recorded
Invalid request body
Missing or invalid authentication
Only the owner of an account at most 14 days old may record this
Internal server error