Skip to content

28. Shopify Sync & Conversion Tracking

Shopify integration connects product data and conversion events to Klariton. Product sync builds the catalog. Conversion tracking shows whether AI touchpoints influenced purchases.

Shopify connects through OAuth. Klariton requests read-only product/catalog access for product import. Klariton should not write products, orders, or customer records back to Shopify.

After OAuth, Klariton starts an initial import. A connected store shows sync status in the Product area and on the dashboard when available.

The product sync imports Shopify products and selected metafields into Klariton.

The import pipeline:

  1. Fetches products from Shopify with pagination.
  2. Fetches product metafields.
  3. Maps Shopify products to Klariton customer products.
  4. Skips draft or archived products and products without required fields.
  5. Upserts products in batches.
  6. Stores sync result, duration, skipped count, and errors.

Manual re-sync can be started by owners/admins. A sync lock prevents duplicate runs. If a sync gets stuck, stale-lock recovery allows a later run to take over after a timeout.

The product sync is designed to run hourly where the production cron is configured.

Klariton can store:

  • product ID and external ID,
  • title and description,
  • variants,
  • price,
  • availability,
  • image,
  • manufacturer,
  • category,
  • Shopify metafields,
  • product URL,
  • source and sync metadata.

Use product settings to exclude unsuitable products from BIQ generation, recommendations, or AI-facing sitemap output.

Conversions are shown under Analytics -> Conversions.

Conversion events can come from:

  • Shopify webhook,
  • Shopify pixel,
  • generic pixel,
  • lead form.

The conversion table includes:

  • date,
  • Shopify order link where available,
  • source,
  • UTM source,
  • order value,
  • product count,
  • chat attribution state.

The Shopify order webhook is verified with HMAC using Shopify’s webhook signature. Klariton maps the order to a conversion event and deduplicates by external event ID.

The webhook extraction is intentionally PII-minimal. It reads order value, currency, product IDs, variant IDs, a Klariton session marker, and allowed marketing attribution fields. Customer email, address, and client details are not used for conversion storage.

The shop domain header is checked against the connected Shopify domain when the organization has a Shopify connection. This prevents conversions from another shop being accepted for the wrong organization.

Chat attribution uses the Klariton session marker when it is present in Shopify line-item properties. Without that marker, the conversion can still appear but may be marked as not attributed to chat.

UTM attribution keeps only allowed marketing keys such as utm_source, utm_medium, utm_campaign, utm_term, and utm_content. Other query parameters are discarded to avoid storing personal data from campaign URLs.

  • Connect Shopify before generating large product BIQ batches.
  • Check sync status after OAuth and after manual sync.
  • Review skipped and failed products.
  • Keep Shopify product titles and metafields clean because they become source data.
  • Verify conversion tracking with a test order before relying on revenue attribution.
  • Do not put customer personal data into product metafields used for AI answers.

See also Products & Materials, Analytics & Insights, and Security & Privacy.