Skip to navigation

Analytics and attribution

Beta

Captain credits an order to search when a consenting shopper clicked the same product variant in Captain’s results in the 24 hours before buying.

You’ll need: the app embed turned on (see Turn on storefront search) and Shopify’s consent banner turned on.

Search works for every shopper. Analytics depend on the shopper’s consent, which the embed reads through Shopify’s Customer Privacy API.

  • Before consent, the embed sends searches with no identity, and those searches stay out of the search log. It records no clicks.
  • Consent counts only when it’s explicit. Both Shopify’s analytics processing check and the shopper’s recorded analytics choice must say yes. A shopper who hasn’t answered the consent banner counts as not consenting. The app never grants consent for the shopper.
  • After consent, the embed creates a random anonymous token (captain- followed by a random UUID). It keeps the token in the browser’s local storage and writes it to the cart attribute captain_user_token. Searches, clicks and the resulting order share that token.
  • When the shopper revokes consent, the embed deletes the token from the browser and clears the cart attribute. Later searches carry no identity again. Revoking stops new data. It doesn’t delete searches, clicks or orders Captain already holds.
If the store shows no consent banner, no shopper consents, so Captain records no searches, clicks or attributed orders. Turn on Shopify’s consent banner to measure search revenue.

The token isn’t tied to a Shopify customer account or email address. Captain doesn’t use customer IDs for attribution.

The Captain web pixel

Captain installs a Shopify web pixel on your store when it connects. A store connected earlier gets it on its next sync. You don’t set anything up.

Shopify runs the pixel only for shoppers who allowed analytics, or where the store needs no consent. It reports three things to Captain:

  • Add to cart. Captain records every add. An add counts toward search when the shopper reached that product from a Captain result in the 24 hours before.
  • Completed checkout. This links express checkout orders to search (see below).
  • Page views. Captain counts each browser that allowed analytics once per day, to measure store conversion.

What Captain measures

  • Searches, clicks on search results, add-to-cart and orders.
  • From orders: revenue, order count and average order value.
  • Store conversion: orders from shoppers who allowed analytics, divided by the distinct browsers that allowed analytics and viewed a page, per UTC day. The connection’s API and the console show it over 30 days.

Captain measures it with the web pixel, so it needs no extra Shopify permission.

  • Shoppers who declined analytics are in neither number. In a store that asks for consent, it covers only shoppers who allowed analytics.
  • It isn’t the same number as Shopify’s own conversion rate, which counts every session.
  • It counts from the day the pixel was installed. There’s no history before that.

Buy it now, Shop Pay and similar buttons skip the cart, so the order carries no token. The pixel’s checkout report supplies it instead. Captain accepts it only when the report’s checkout matches the order in Shopify’s signed order notification. Captain keeps only a hash of the checkout token.

The order and the report can arrive in either order. If the order comes first, Captain counts it without attribution, then credits it to search when the report arrives. An order is credited only if the shopper allowed analytics.

For the order data Captain keeps, see What syncs. For privacy requests, see Settings and privacy.