Jingo

Developer guide

Adding Jingo to your storefront

Jingo is a shopping assistant that appears on your product pages. It knows your catalog, answers shopper questions, and recommends from your own range. The integration is one script tag, one empty div, and a product feed URL — on any platform. Budget about an hour.

Before you start

You need two things, both on your Jingo dashboard.

WhatLooks like
Shop keyjgo_2f2dd7af34f47d6208facc82
Allowed originshttps://acme.com

Your shop key is not a secret — it sits in a public script tag on a public page. What protects your store is the allowed origins list: Jingo only renders on domains you have registered.

Staging

Ask for a second key rather than reusing production. Two keys keep staging traffic out of your live analytics, and untangling them later is painful.
01

Send us your product feed

Jingo can't recommend products it hasn't seen, so this comes first. Send us a product feed URL — if you already advertise on Google Shopping, that same URL is fine. We accept Google Merchant Center XML or CSV, and poll it hourly.

FieldWhy we need it
idUnique product identifier
titleProduct name
linkThe product page URL — this is how we match a page to a product
image_linkProduct image
priceWith currency, e.g. 248.00 USD
availabilityin stock / out of stock
brandBrand name
descriptionWhat the assistant draws on to answer questions

Add item_group_id, size and color if your products have variants.

Check this one

A Google Shopping feed is usually the advertisable subset of a catalog — it commonly excludes out-of-stock items. Anything missing from the feed won't be recognised when a shopper lands on its page. If yours is filtered, send us an unfiltered version.
02

Add the script tag

Put this in your site's global template so it loads on every page. The footer is fine. Google Tag Manager works identically.

<script async src="https://cdn.jingo.app/embed/loader.js"
        data-jingo-shop="YOUR_SHOP_KEY"></script>

That's the whole installation. It loads asynchronously and blocks nothing.

Don't pin a version

We ship fixes by replacing the file behind that path. Adding a version number to the URL means you stop receiving them.

Content Security Policy

If your site sends a CSP header, allow these three:

script-src  https://cdn.jingo.app
frame-src   https://api.jingo.app
connect-src https://api.jingo.app
03

Add the slot

The script needs somewhere to render. Put an empty div on your product page template, wherever you want the assistant — under the buy button is the usual spot.

<div id="assistant-slot"></div>

It has no styles of its own and fills the width of its container. The assistant renders in an iframe inside it, so your CSS can't break it and it can't break your page. data-jingo-slot works too if an id is inconvenient.

At this point you're live. Load a product page and the assistant should appear.

04

Tell us which product

By default Jingo works out which product a page shows by reading the page's <link rel="canonical"> URL — matched against your feed's link field — and then the schema.org/Product JSON-LD block if one is present.

That's enough on most stores. If your pages have no canonical tag, or your JSON-LD has no sku, say so explicitly:

<script>
  window.jingo = window.jingo || function () {
    (jingo.q = jingo.q || []).push(arguments)
  }

  jingo('page', { type: 'pdp', productId: 'OV-MRS-0142' })
</script>

The first two lines are a queue stub — include them once, above any jingo() call. They let you call jingo() before the script has loaded; the calls replay once it does. productId should match the id in your feed.

If we can't identify it

Jingo renders nothing. That's deliberate — an assistant confidently discussing the wrong product on your storefront is worse than no assistant at all.

Single-page storefronts

If selecting a size or colour changes the URL without a page reload, Jingo picks it up automatically — it watches pushState, replaceState and popstate. Nothing for you to do.

05

Consent

Off by default

Jingo sends no shopper events until consent is granted. Skip this step and the assistant still renders, but you get no analytics.

Tell Jingo when your consent banner resolves:

jingo('consent', true)   // shopper accepted analytics
jingo('consent', false)  // shopper declined

Or set a global that Jingo reads on its own:

window.__consent = { analytics: true }

If you use a CMP — OneTrust, Cookiebot, Osano — you'll need to add Jingo to your vendor list. At larger companies that takes longer than the code does, so start it early.

Tracking shopper actions

One event is automatic: product_viewed, sent whenever the assistant identifies a product page. The rest you send as they happen.

jingo('track', 'product_added_to_cart', {
  productId: 'OV-MRS-0142',
  variantTitle: 'US 4 / Ink & Ivory',
  quantity: 1,
  price: '248.00',
  currency: 'USD'
})

jingo('track', 'search_submitted', {
  query: 'silk dress',
  resultProductIds: ['OV-MRS-0142', 'CO-INS-0088']
})

jingo('track', 'checkout_started', {
  productIds: ['OV-MRS-0142'],
  totalPrice: '248.00',
  currency: 'USD'
})

jingo('track', 'purchase', {
  orderId: 'ORD-5521',
  orderTotal: '248.00',
  currency: 'USD'
})

Event reference

The loader adds clientId, shop and consentGranted to every event — you never send those yourself. Bold fields are required; an event without one is dropped.

EventSent byFields
product_viewedAutomaticproductId, handle, productTitle, variantId, variantTitle, price, currency
search_submittedYouquery, resultProductIds
product_added_to_cartYouproductId, handle, productTitle, variantId, variantTitle, quantity, price, currency
collection_viewedYoucollectionId, collectionTitle, resultProductIds
checkout_startedYouproductIds, totalPrice, currency
purchaseYouorderId, orderTotal, currency

Field formats

  • Prices are numeric strings — "248.00", not "$248.00". The loader normalises what it reads from JSON-LD; what you pass to jingo('track', …) is sent as-is.
  • currency is a 3-letter ISO code. query is capped at 200 characters. ID arrays are capped at 10.
  • IDs must match the id in your feed, or we can't resolve them.

Why purchase needs an order id

We deduplicate on it. Confirmation pages get refreshed, bookmarked and reopened, and every one of those fires your tag again — we would rather miss an order than count one three times.

Same events as Shopify

Jingo's Shopify app sends this exact payload shape to this exact endpoint. The backend can't tell the two apart, so everything the assistant learns from a Shopify store it learns from yours, on the same terms.

Checking it works

Add ?jingo_debug=1 to any product page URL. Jingo logs what it's doing to the browser console.

What you seeWhat it means
no slot foundThe div isn’t on the page. Check it’s on the product template, not just one page.
nothing identifiableNo canonical URL and no JSON-LD sku. Declare it with jingo(‘page’, …).
not a product pageJingo doesn’t think this is a PDP. Declare it explicitly.
Nothing in the console at allThe script isn’t loading. Check your CSP, and that the tag is in the rendered HTML.
Works live, not on stagingYour staging domain isn’t in the allowed origins list. Send it to us.
No events arrivingConsent hasn’t been granted. See step 5.
Renders, but doesn’t know the productIt’s missing from the feed, or its link doesn’t match the page’s canonical URL.

What Jingo stores

  • A visitor ID we generate, in localStorage on your domain under _jingo_cid. A random identifier — no personal data.
  • The events you send us, linked to that ID.

We set no cookies on your domain. On Safari the visitor ID lasts about seven days, which is a browser limit rather than a choice of ours.

Reference

Script tag attributes

AttributeRequiredDescription
data-jingo-shopYesYour shop key
data-jingo-apiNoOverride the API origin, for testing
data-jingo-debugNoSet to 1 to always log

JavaScript API

CallDescription
jingo('page', { type, productId })Declare what this page shows
jingo('track', event, payload)Send a shopper event
jingo('consent', bool)Set analytics consent
jingo('getClientId', fn)Read the visitor ID
Stuck? Email your Jingo contact with your shop key and a product page URL. Turn on ?jingo_debug=1 before you send a console screenshot — it tells us in one look what's happening.