SDKs
ikas
The snippet and the ikas bridge: tests on your ikas store, its storefront events, and its paid, cancelled and refunded orders as goals.
On an ikas store, LiftCanary runs as two scripts: the website snippet, for flags, no-code and redirect tests, the visual editor and personalizations, and a small ikas bridge (1.5 KB) that turns the storefront events every ikas store publishes, from product views to completed orders, into goals. No theme code is changed. Connect the store's orders too, and experiments can be decided on what is paid and kept: bank transfers and cash on delivery once they're paid, minus cancellations and refunds (see Orders from ikas).
Copy your SDK key
In LiftCanary, open Install and copy the SDK key of the environment to use (it starts with
pk_).Add the scripts to your store
In your ikas admin, add a storefront script under Eklentiler (Plugins) with the code below and your SDK key in place of
pk_.... If ikas offers a priority setting, choose the highest, so the snippet loads at the top of the page and tests apply before it's shown.ikas admin · storefront script <style id="liftcanary-hide">body{opacity:0!important}</style> <script>setTimeout(function(){var s=document.getElementById("liftcanary-hide");if(s)s.remove()},1500)</script> <script>window.liftcanary=window.liftcanary||{q:[],onReady:function(f){this.q.push(f)},track:function(e,o){this.q.push(["track",e,o])},activate:function(k){this.q.push(["activate",k])},consent:function(g){this.q.push(["consent",g])}};</script> <script src="https://cdn.liftcanary.com/sdk/v1/liftcanary.js" data-sdk-key="pk_..."></script> <script src="https://cdn.liftcanary.com/sdk/v1/ikas.js" defer></script>Add the goals
Open your store, view a product and add it to the cart. In LiftCanary, Goals now lists the events below under tracked events without a goal: add the ones you want to measure, then use them in experiments.
Events from the store#
| Event key | ikas event | Value |
|---|---|---|
purchase | COMPLETE_CHECKOUT | Order total, once per order |
begin_checkout | BEGIN_CHECKOUT | – |
add_to_cart | ADD_TO_CART | – |
product_view | PRODUCT_VIEW | – |
These are the same event keys as on Shopify, so goals and reports read the same on both. Use purchase as a conversion goal for conversion rate, and as an average-per-visitor goal for revenue per visitor. Purchases carry currency, order_id and items properties, and an order is counted once per browser, so a reloaded order page doesn't count twice.
Customers#
When a customer signs in (CUSTOMER_LOGIN) or completes a checkout (COMPLETE_CHECKOUT, guests included: ikas gives them a customer id too), the bridge identifies them as ikas:<customer id>. Their visit before and their orders afterwards then count as one person, they keep their variation on every device, and the orders ikas sends find the visitor who saw the experiment. To keep customers anonymous, add data-identify="off" to the ikas.js script tag; orders from ikas then can't count for anyone in an experiment.
Check it works#
Open your store with ?liftcanary_debug=1 at the end of the address and open the browser console: each ikas event is logged as it arrives, with the goal it was counted as. Place a test order and check that the order total appears with purchase. ikas publishes the event types but not every field of their data; if your total is missing, write to [email protected] with what the console shows.
Orders from ikas#
The bridge counts an order when the thank-you page shows. That's all a page can see: a bank transfer that is never paid, cash on delivery that is refused at the door, an order cancelled the next day or sent back a week later still count as sales, and an ad blocker hides some orders altogether. ikas itself knows what happens to each order, and sends it to LiftCanary once the store is connected: no code, and nothing to change in the theme.
Create a private app in ikas
In your ikas admin, open Uygulamalar → Uygulamalarım → Özel Uygulamalar and choose Özel Uygulama Ekle. Name it LiftCanary and give it one permission: Siparişler (orders), read only. ikas shows its client ID and client secret; copy the secret right away, ikas shows it once.
Paste its keys into LiftCanary
In LiftCanary, open Integrations, and under Store, ikas: choose the environment whose SDK key is in your store's script, and paste your store's name (the part before
.myikas.com), the client ID and the client secret. LiftCanary checks them with ikas and adds its webhook to your store; if ikas refuses, it says why, and nothing is saved.Add the goals
In Goals, choose New goal and one under From your store, then use it in experiments like any other goal.
| Goal | Event key | Counts | Measured as |
|---|---|---|---|
| Paid order | store.order_paid | An order whose payment went through: by card at checkout, or a bank transfer or cash on delivery once ikas marks it paid | Conversion rate |
| Store revenue | store.revenue | Each paid order's total, minus what is cancelled or refunded later, in part or in full | Value per visitor |
| Cancelled or refunded order | store.order_cancelled | An order cancelled or refunded in full, paid or not; a winner lowers it | Conversion rate |
An order counts for its customer, ikas:<customer id>, whom the bridge identified at checkout (see Customers), so it counts for the variation they saw. ikas sends the whole order each time it changes; an order counts as paid once, with its total, and later its revenue follows the order's net total: a partial refund subtracts what was refunded, a full one the rest. Orders paid by bank transfer, cash on delivery and returns come days after the visit, so in the dashboard Paid order starts with 7 days of late conversions, and Store revenue and Cancelled or refunded order with 14, the time customers have to send an order back (see Goals). Keep the bridge's purchase goal for what happens on the page; these goals are for what happens to the order.
The ikas card under Integrations shows the last 7 days for each environment: how many order events arrived, how many found their visitor, and how many came from visitors who were in an experiment. Orders that don't find their visitor mostly mean the bridge isn't on the store, or is set to data-identify="off". ikas tries a refused call three times, then stops: orders sent while LiftCanary couldn't take them aren't sent again. Disconnecting removes LiftCanary's webhook from your store.
Privacy#
The bridge sends order totals, currency, item counts and order ids, never names, addresses, emails or payment details. From the orders ikas sends, LiftCanary keeps the order and customer ids, the order number, its status, the amounts and the currency, and nothing else: no names, emails, phone numbers or addresses. Each call is checked against ikas's signature, made with the private app's client secret, which LiftCanary keeps encrypted and never shows again; the SDK key in your pages can't send these events. To wait for cookie consent, add data-consent="required" to the snippet's script tag and call liftcanary.consent(true) from your consent banner (see Privacy, cookies and consent).