Destinations
Send your affiliate sales to Google Sheets
You copy sales from your networks into a sheet by hand, and the sheet is old the day after. A destination keeps the sheet current for you.
What it looks like
- Google Sheets
- BigQuery
- Google Analytics 4
- An event, for example
conversion.updated, is the input of a destination. - The destination sends the event to your tool. Google Sheets and BigQuery keep data. Google Analytics 4 gets events.
- Google Sheets keeps one row for each conversion. A change of the conversion updates its row.
Why this matters
A sheet is the tool that many people already use for reports, taxes and charts. When the data is in the sheet, you do not need to open each network.
A sheet that updates itself is a sheet that you trust. You do not wonder if you added the last sales.
Why most tools cannot tell you
A manual export is a copy of one moment. A sale that is pending today can be approved or rejected next week, and the copy does not change.
A tool that only appends rows adds the same sale again for each status change. You then count the sale two or three times.
A tool that sends data must also handle the failures of the other side. Without retries and a log, you do not know that rows are missing.
How AffFast does it
A destination is a setting of your workspace. You make it one time. After that, each new conversion and each change of a conversion goes to the sheet, usually within seconds.
Column A of the tab Conversions holds the ID of the conversion. A change updates the row of that ID and a new conversion adds a row. Delivery is at least once. Google Sheets updates the row of the ID, so a repeat does not add a row.
The destination retries a temporary error. GET /v1/destinations/{id}/deliveries shows the log of each call, and the event destination.failed tells you when a destination stops.
How to do it
- Make a service account in Google Cloud and save its key as a JSON file. Use a spreadsheet that this service account can edit.
- Make the destination with
POST /v1/destinations. Settypetogoogle_sheets, setconfig.spreadsheet_idand send the key incredentials.service_account_json. - Test it with
POST /v1/destinations/{id}/test.ok: truemeans that the sheet accepted the test item. - Send the old conversions with
POST /v1/destinations/{id}/backfill. A new destination gets only the changes that come after you make it. - Look at
GET /v1/destinations/{id}/deliverieswhen a row is missing.
Learn more
Features that this guide uses
Related guides
Start your free trial
Free for 14 days. No card needed. Cancel any time.