Validating Order Reporting
Order Reporting
Each time a Publisher drives a purchase, they generate a commission. This section tests to make sure Button attribution is properly tracking these orders.
New orders
Mobile Web
Steps
- Uninstall your app from the device.
- Create a Button Link via the instructions above.
- Go to the Button Link in a device's native browser.
- After landing on your mobile website, take note of the
srctok-xxx
value in thebtn_ref
parameter on the resulting link.- You can expect the format of the
btn_ref
value to be:^srctok-[a-f0-9]{16}$
(e.g.srctok-abcdef0123456789
).
- You can expect the format of the
- Make a purchase, taking note of the order ID. This is typically sent in a confirmation email or shown on the website after the purchase is made.
- Head to the Orders tab in the Button Dashboard.
- Search for the order ID or
srctok-xxx
- value in the search bar at the top.
- The test is a success if the order shows with the correct order total.
App (iOS + Android)
Make sure to test each of the following scenarios with the steps outlined below:
- Cold Start – an app that has been launched but is not currently running
- App Running – an app that is running in the background
Note: this test will work on mobile devices that already have installed your test app.
You will need to construct or receive a Button Universal link for your app that includes a valid "test" Attribution Token.
Example: https://yourbrand.bttn.io?btn_ref=fakesrctok-abcdef0123456789
Note: the format of the fake
srctok
is:^fakesrctok-[a-f0-9]{16}$
(e.g.fakesrctok-abcdef0123456789
). Do not use the same value multiple times.
Steps
- On iOS, paste this link into your notes app.
- Tapping on the resulting hyperlink should deeplink you directly into your app.
- On Android, paste this link into your native browser.
- Tapping the link should prompt you to open your app.
- After deeplinking into your app, ensure you were routed to the proper in-app destination.
- Make a purchase.
- Obtain the order ID. This is typically sent in a confirmation email or shown in-app after the purchase is made.
- Head to the Orders tab in the Button Dashboard.
- Search for the Order ID in the search bar at the top.
- The test is a success if the order shows with the correct order total.
Adjustments Tests
Order Payload Validation
Button requires the following list of fields be reported for all orders. Note: some of these fields may not yet be a technical requirement of Button’s Order API, i.e. may not be needed to receive an HTTP
200 response code.
order_id
total
currency
purchase_date
btn_ref
customer_order_id
line_items[].identifier
line_items[].total
line_items[].quantity
line_items[].description
line_items[].sku
line_items[].upc
line_items[].category
Tests Completed by Button
There are a few tests that must be completed by Button’s QA team before launch; they will complete these for you and verify all functionality is working as expected.
Getting Help
Having trouble testing your apps? Reach out to your Button representative who can assist with any questions.
Updated 2 months ago