Skip to main content
ShareASale → BigQueryIntegration guide

Connecting ShareASale to BigQuery

ShareASale is a long-established last-click affiliate network, which means the same voucher-code interception problem as any last-click programme, at the scale of a very large publisher base. BigQuery has no attribution model, no deduplication rules and no opinion about your data — which makes it the only destination on this site where every number is exactly as good as the query that produced it. The join between them succeeds or fails on one thing: whether whatever join key you decide on reaches the ShareASale transaction before the conversion happens, because BigQuery can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

ShareASale in BigQuery: time from click to order, by publisher

Load ShareASale's transaction report into BigQuery through the merchant API or scheduled exports, keyed on your order ID, and join it to your orders and landing-click tables. Load each state change as a new timestamped row, deduplicated on transaction ID plus state. Then measure click-to-order time and paid-click overlap to total commission paid on interception.

BigQuery is where the analysis this source exists for actually gets run. Load ShareASale's transaction report, through its merchant API or scheduled exports, keyed on your order ID, which you passed in the tracking call as the order reference, and join it to your own orders table and your landing-page click table. Check whether your program has been migrated to Awin's platform, since that changes where the transaction data comes from.

Then compute the two numbers nobody looks at: time from the affiliate click to the order, and whether a paid ad click identifier (gclid, fbclid and the rest) exists on the same order from earlier in the journey. Orders where a voucher publisher's click lands in the last minute after a paid click are interception, and you can now total the commission paid on them by publisher. That total is usually the business case for changing commission terms.

Transactions change state after you first load them: pending, locked, voided for returns. Load each state change as a new row with a timestamp rather than updating in place, and deduplicate on ShareASale's transaction ID plus state. Refunded orders should show a voided commission; where they do not, that is money to claim back.

ShareASale → BigQuery · what breaks

Why this join usually fails — ShareASale → BigQuery

  1. 01

    Whatever join key you decide on never reaches ShareASale

    The affiliate cookie is set on click and read at checkout, and a voucher-site click seconds before the order will overwrite whatever preceded it.

  2. 02

    Voucher publishers earning on sales your ads produced

    A customer arrives from a paid ad, opens a tab to find a code, clicks a voucher site's link and returns to buy. Under last-click the voucher site earns the commission on a sale your advertising created — and your paid reporting counts it too.

  3. 03

    The warehouse quietly disagreeing with every platform

    This is not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.

  4. 04

    Nothing reconciles afterwards

    BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.

ShareASale → BigQuery · the fix

What working looks like — ShareASale → BigQuery

  • Whatever join key you decide on on every conversion

  • Conversions arriving in BigQuery

    The row lands in a table you own, joinable to every other table you own, with no window and no expiry.

  • Reconciled against the source

ShareASale → BigQuery · architecture

How ShareASale and BigQuery actually connect

  1. 1

    ShareASale holds the truth

    Publisher type is the whole analysis. Content publishers introduce customers; voucher and cashback publishers intercept them at the basket. Both are paid the same way and they are not the same thing.

  2. 2

    BigQuery needs a click to match

    BigQuery needs a schema and consistent types. The failure mode is not rejection, it is silent divergence: a column that arrives as a string in one load and an integer in the next, or a timestamp in the wrong zone, which produces answers that look plausible and are not.

  3. 3

    The identifier is the bridge

    Whatever join key you decide on, captured at the visit and carried into the ShareASale transaction.

  4. 4

    The event source decides reliability

    Send orders net of commission, with affiliate-sourced orders marked and publisher type recorded.

  5. 5

    Deduplication at the destination

    Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.

ShareASale → BigQuery · normal or broken

Working vs. broken, side by side — ShareASale → BigQuery

Normal, not a fault

  • Whatever join key you decide on present on the conversion

  • Sent from your order record with affiliate attribution

  • Deduplicated correctly

    Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.

  • Reconciles with the source

Actually broken

  • Whatever join key you decide on missing on most records

    The affiliate cookie is set on click and read at checkout, and a voucher-site click seconds before the order will overwrite whatever preceded it.

  • Sent from the browser

    A customer arrives from a paid ad, opens a tab to find a code, clicks a voucher site's link and returns to buy. Under last-click the voucher site earns the commission on a sale your advertising created — and your paid reporting counts it too.

  • Counted twice, or not at all

    This is not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.

  • Nobody has reconciled it

ShareASale → BigQuery · diagnose

Diagnostic order — ShareASale → BigQuery

  1. 01

    Count conversions carrying whatever join key you decide on

  2. 02

    Follow one real conversion end to end

  3. 03

    Segment commissions by publisher type and time-from-click to order

    Clicks seconds before an order are interception. That segmentation is available and rarely run.

  4. 04

    Reconcile warehouse order counts against each platform for one closed window

    The gaps localize the problem: a gap against all platforms is a collection issue, a gap against one is that platform's window or matching.

  5. 05

    Read the match rate, not the success message

    BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.

ShareASale → BigQuery · prove

How it gets proven — ShareASale → BigQuery

Source of truth

Orders flagged by affiliate, with commission recorded and the publisher type identified.

  • Whatever join key you decide on confirmed present on a live conversion.
  • Warehouse order counts and revenue reconciled against the source system for a fully closed window, with duplicates checked on the join key.
  • Orders reconciled net of commission against imported conversions, with the paid-media overlap measured.

ShareASale → BigQuery · free audit

What we check in the free audit

  • Count conversions carrying whatever join key you decide on
  • Follow one real conversion end to end
  • Segment commissions by publisher type and time-from-click to order
  • Reconcile warehouse order counts against each platform for one closed window
  • Read the match rate, not the success message

Checked against

Orders flagged by affiliate, with commission recorded and the publisher type identified.

Get my free conversion tracking audit

Free30 minutesNo obligation

ShareASale → BigQuery · when not to buy

When you don't need this — ShareASale → BigQuery

  • Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry whatever join key you decide on.
  • No affiliate programme means none of this applies. If you run one, the commission structure by publisher type will change your economics more than tracking accuracy will.
  • If you have one store and one ad platform, a warehouse is infrastructure you will maintain for a reconciliation you could do in a spreadsheet.

ShareASale → BigQuery · what we deliver

What gets built — ShareASale → BigQuery

  • Identifier capture into ShareASale

    Record the click timestamp alongside the affiliate identifier so late-journey interception is visible.

  • Event source: your order record with affiliate attribution

    Send orders net of commission, with affiliate-sourced orders marked and publisher type recorded.

  • Dispatch to BigQuery

    Streaming inserts or scheduled batch loads from your order system, with the raw event retained alongside whatever you derive from it.

  • Reversals where they exist

    Refunds reverse and should reverse the commission.

Written guarantee

95%+ tracking accuracy

Measured against Orders flagged by affiliate, with commission recorded and the publisher type identified.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

ShareASale → BigQuery questions, answered

Use the order ID you send in the ShareASale tracking call as the key, so each transaction row matches one order in your own table.

Free · 30 min

Get ShareASale and BigQuery joined properly

Free30 minutesNo obligation