OpinlySDK

Conversion goals & revenue

Choose what counts as a conversion, and how revenue is attributed back to a campaign.

Traffic numbers are the easy part. The reason to run analytics at all is to know which campaigns produce outcomes — so Opinly asks you what an outcome is.

Choosing your goal

You pick a goal when you first set up analytics. It's the single most consequential setting here, because it decides what gets counted.

If you connected WordPress for content publishing, the pixel may already be running before you ever reach this step. Until you pick a goal, form submissions are recorded by default.

GoalWhat it meansPick it when
PurchasesOrders are your conversions, valued at their totalYou sell something
Form fillsMatched form fills are your conversionsYou generate leads or signups
Just analyticsTraffic and sources, with form fills left uncountedYou only want traffic and sources

Picking Form fills starts recording your submissions straight away. To have them counted as conversions, we'll set up a conversion definition with you.

If you sell through WooCommerce, choose Purchases. Your store already reports orders server-side, and that's the number worth optimising against.

What counts as a conversion

These event names count as conversions, from the browser or your server:

purchase · sign_up · add_to_cart · generate_lead

form_submit counts too, but it's browser-only — it's a reserved name, and sending it from your server is rejected with a 400. It also counts only once it matches an enabled conversion definition.

refund is recorded too, stored with its negative value, and is never counted as a conversion. Revenue reports show gross revenue from purchases, so your refunds sit alongside them rather than netting off.

signup and lead are accepted permanently alongside sign_up and generate_lead, but they're stored exactly as sent rather than folded together — pick one spelling and keep to it. Prefer the longer names, which match the standard events used server-side.

Purchases and revenue drive the headline number. The conversion count and rate on Overview are built from purchase revenue plus matched form submissions. sign_up, add_to_cart and generate_lead are stored and appear in your conversions chart and event list, but don't move that headline figure.

Any other event name is recorded for your traffic reports but won't appear as a conversion. See where events land.

Conversion definitions

A conversion definition is what turns a form fill into a conversion. It matches on the page path and the form, and carries the value that fill is worth to you.

Definitions are set up with you rather than self-serve. Choosing Form fills starts recording your submissions immediately — tell us which one signals a real lead and what it's worth, and we'll switch on the definition that matches it. Your form conversions count from there.

Definitions apply to form fills. To count something else as a conversion, send it under one of the standard event names above.

Revenue

Revenue comes from value and currency on a purchase or refund. On any other event, a value property is just a property — it never becomes money.

window.opinly.track('purchase', { value: 49.0, currency: 'USD' }, {
  externalEventId: 'order_123',
})

value is in major units — dollars, not cents — and is always a positive number. Refunds carry their own sign; send 49.0, not -49.0, and Opinly stores it as negative.

Revenue is attributed to the campaign that brought the visitor in, not the last page they saw. That's the whole point: a sale traces back to the ad click that started it, however many visits ago that was. How that link survives the trip through your server is covered in Linking server events.

Where to look

Analytics → Conversions breaks revenue down by source, so you can see which campaigns paid for themselves. Analytics → Overview carries the headline conversion count and rate.

If revenue is landing but showing as direct, the events are arriving without a usable visitor link — see checking it worked.