Skip to the content

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

Event to destinationsSample data
conversion.updated
  • Google Sheets
  • BigQuery
  • Google Analytics 4
  1. An event, for example conversion.updated, is the input of a destination.
  2. The destination sends the event to your tool. Google Sheets and BigQuery keep data. Google Analytics 4 gets events.
  3. 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

  1. Make a service account in Google Cloud and save its key as a JSON file. Use a spreadsheet that this service account can edit.
  2. Make the destination with POST /v1/destinations. Set type to google_sheets, set config.spreadsheet_id and send the key in credentials.service_account_json.
  3. Test it with POST /v1/destinations/{id}/test. ok: true means that the sheet accepted the test item.
  4. Send the old conversions with POST /v1/destinations/{id}/backfill. A new destination gets only the changes that come after you make it.
  5. Look at GET /v1/destinations/{id}/deliveries when a row is missing.

Learn more

Features that this guide uses

Start your free trial

Free for 14 days. No card needed. Cancel any time.