Purchase Referral Attribution
*For Storefront Developers Only
You may be interested in analyzing the referral sources to your storefront for purchases. This information is included alongside Purchase information in the referral object, if it is available.
referral.sourceis derived from a combination of UTM parameters, click IDs, and HTTP headers sent in the initial request.referral.methoddescribes which method was used for deriving thereferral.source.referral.hostprovides the host of the HTTPrefererheader, if it was passed in.
In order to set up referral attribution for your purchases, follow the next steps:
(recommended) Add utm_source to links to your webshop
utm_source to links to your webshopEnsure any direct links to your storefront URL have the utm_source query parameter appended.
Some sites, like Facebook, automatically append click ID's, UTM parameters, or send the referer header to their URLs to allow attribution to work. Others, like Discord, do not do this. If you want to track referrals consistently, we recommend appending theutm_source param to all of your respective URLs accordingly:
www.exampleshop.com/?utm_source=discord
Accepted utm_source values typically follow lowercase and no-space formatting: facebook, discord, instagram, twitter, youtube, google, chatgpt, support. Please contact Neon if there additional values you'd like to support.
Ingest the purchase data via webhook or API
To read the referral object on the Purchase, you can ingest the purchase.completed webhook or call the Purchase API (e.g. GET /purchases ).
Updated 2 months ago
