Button Links Integration
Button Links
Button Links allow you to create a link that utilizes Button's routing and attribution systems to help a user shop in-app or on the web.
Example
Link Composition
Raw Link
https://r.bttn.io? \
btn_url={https%3A%2F%2Fwww.retailer.com} \
&btn_pub_user={user_id_here} \
&btn_ref={org-0000000000000000}
https://r.bttn.io?btn_url=https%3A%2F%2Fwww.retailer.com&btn_pub_user=user-123&btn_ref=org-0000000000000000
Query String Parameters
Button Links accept the following query string parameters. All links must only contain ASCII characters and have properly encoded query strings.
| Field | Required? | Definition |
|---|---|---|
btn_url |
Yes | The target destination URL (url-encoded, including https). This can be a retailer landing page or an affiliate tracking link, depending on whether Button manages your affiliate network accounts. e.g., https%3A%2F%2Fwww.retailer.com/p/12345 |
btn_ref |
Yes | Your Button Organization ID (always starts with the prefix org-).e.g., org-0000000000000000This can be found in your Button Dashboard. |
btn_pub_user |
Required for user rewards | Your user’s unique identifier. This value will be passed back to you on any transaction webhook events associated with downstream conversions. Must be under 256 characters. e.g., user-12345Note: If you reward users for shopping activity, you should include this value in order to know which user to reward. |
btn_pub_ref |
No | A unique publisher reference value (e.g. click ID, campaign ID). This value will be passed back to you in webhook events associated with any downstream conversions activity. Must be under 512 characters (decoded). e.g., click-abc123 |
Passthrough Values
Similar to how publishers can leverage Button's Publisher SDK to persist values across taps and conversion events, publishers can pass a user ID or unique publisher reference value directly on Button Links.
Simply add the btn_pub_user parameter to pass through your user's unique identifier, or add the btn_pub_ref parameter to pass through your unique publisher reference (e.g., click ID, campaign ID).
Example Button Link
Link Composition
Raw Link
https://r.bttn.io? \
btn_ref={org-0000000000000000} \
&btn_url={https%3A%2F%2Fwww.retailer.com} \
&btn_pub_user={user_id_here} \
&btn_pub_ref={your_passthrough_value}
https://r.bttn.io?btn_ref=org-0000000000000000&btn_url=https%3A%2F%2Fwww.retailer.com&btn_pub_user=user-123&btn_pub_ref=your-ref
Leveraging Button Links via API
- Generate a Link — the Button Links API can be used to generate Button Links via an API call.
Updated 27 days ago