Integrations
Integrations in Glancy is where every connection to a bucket lives: the SDKs and tools that send it events (sources), the ad accounts whose spend it imports, and the ad platforms it sends conversions to (destinations). Open it from Setup at the bottom of any bucket's sidebar: it's the Integrations tab.
Overview and catalog
- Overview draws the bucket in the middle, its sources on the left and its destinations on the right. Each line and card shows its state, so you can see at a glance what is connected and what needs attention.
- Catalog lists everything Glancy can connect to, by category (Website, Mobile, Server, E-commerce, CMS, CDP, Advertising), with a search box. Every integration has its own page, with what it brings in, how to set it up and its controls.
- A bucket with no events yet shows Add your first source above the Overview, with the usual picks one click from their install guide.
| State | What it means |
|---|---|
| Receiving / Sending | Events from this source arrived in the last 7 days (the page says how many, and when the last one came in), or this destination delivered events. |
| Waiting for events | A source with its own write key that hasn't sent anything yet. |
| No events lately | The source was sending, but has been silent at hours when its events usually arrive. See Monitoring. |
| Turned off | A bucket admin turned it off: a source's events are dropped as they arrive, a destination stops sending. |
| Needs attention | A store, ad account or destination couldn't connect, sync or deliver. Its page shows the error. |
| Not connected | Nothing from this integration yet, or it was removed. |
Everyone who can open the bucket sees Integrations. Connecting, turning off and removing things is for bucket admins.
Event sources
The SDKs, the WordPress plugin, Segment and the HTTP API send events with the write key of a source you add in Integrations, one per app or site (see below). Open its page (for example Integrations → Catalog → Next.js, see Pick your SDK) and press Add source: Install then has the step-by-step guide with the source's key and ingest address filled in, and Copy AI prompt for your AI coding assistant. It shows as Receiving as soon as its first event arrives. Once it's sending, Install folds away: Show guide opens it again. Sources, above it, always lists what is connected, with each source's state and key.
Installs made before sources send with the bucket's write key, which keeps working: they show as a
Bucket's key row in Sources. The guide shows that key only for those (Bucket's key (older installs), or Show it under the first step). With the bucket's key, Glancy
tells sources apart by the library each event names in context.library.name, which every Glancy SDK fills in for you. Events with a library it doesn't know (or none) count as the HTTP API,
and Segment's libraries (analytics.js, analytics-node, @segment/…) as Segment.
Sources with their own write key
Add each app or site as a source with its own write key, including when several apps of one kind send to the same bucket (for example a marketing site and a web app both on Next.js). Each one then shows apart on the Overview (one bubble per source), counts its own events, and can be turned off, given a new key or deleted without touching the others.
- Open the SDK's page (Integrations → Catalog → Next.js, for example) and press Sources → Add source.
- Name it ("Marketing site") and press Add source. It gets its own key,
glc_prod_…like the bucket's. - Press Install guide with this key (or pick the source at the top of Install): every snippet is filled in with the source's key. Moving an older install? Put it where the bucket's key goes today; nothing else changes in your code.
Its events are stored in the bucket like any other, with context.source_id set to the source (src_…), so you
can filter or break down reports by it. Glancy sets that property itself from the key; a value sent by the app is
ignored.
On each source's row (bucket admins):
| Button | What it does |
|---|---|
| Turn off / Turn on | While it's off, its events, session replays and heatmaps are dropped as they arrive: not stored, not counted in your usage and not sent to destinations. |
| New key | Replaces its write key. The old key stops working right away, so update it in that app's code. |
| Pencil | Renames it. |
| Delete | Deletes the source: its key stops working. The events it already sent stay. |
The bucket's own write key keeps working next to sources with their own key, so nothing you already installed changes. Events sent with it keep showing under the kind's own bubble (for example Next.js) and follow Manage on that page; sources with their own key don't. Rotating the bucket's key (Settings → Buckets) doesn't change source keys.
Turning a source off
On a source's page, Manage → Turn off stops accepting its events until you turn it back on. Nothing changes in your code: while it's off, its events are dropped as they arrive. They are not stored, not counted in your usage and not sent to destinations, and they can't be recovered later. Events already in the bucket stay.
Use it to silence a noisy staging build, a misbehaving release or a test integration without a deploy. A change reaches every server within about 30 seconds.
Removing a source
Manage → Remove turns the source off and takes it off the Overview. The events it already sent stay, in every report. Remove the SDK (or the API calls) from your code too, or the events keep arriving and being dropped.
A removed source's page offers Add it back, which turns it on and puts it back on the Overview.
Manage covers what arrives with the bucket's write key, told apart by library: two Next.js apps sending with the bucket's key are one Next.js source, so turning it off turns off both. To control apps separately, give each its own write key.
Shopify
The Shopify source brings a store's orders and customers from the server, storefront activity from a pixel, and your order history, with the UTMs and ad clicks behind each order. A bucket admin connects it from Integrations → Catalog → Shopify: its Install guide walks through connecting the store, the storefront pixel, headless storefronts and the order history, and folds away once a store is connected (Show guide opens it again).
Connect the store
Glancy connects through a Shopify app that can only read: it asks for read_orders and read_customers and
nothing else. Shopify no longer lets stores make custom apps in their admin, so the app is made in Shopify's
Dev Dashboard, in the store's own Shopify organization:
In the Shopify admin: Settings → Apps and sales channels → Develop apps → Build apps in Dev Dashboard, then Create an app, named for example Glancy.
Fill in the app:
- App URL: your Glancy address, e.g.
https://app.heyglancy.com. - Embed app in Shopify admin: untick it. Glancy runs on its own site.
- Allowed redirection URL(s): can stay empty for this way of connecting.
- API access → Scopes:
read_orders,read_customers. - Webhooks: leave empty. Glancy subscribes to the ones it needs when it connects.
Then Release the version.
- App URL: your Glancy address, e.g.
Install the app on the store, and copy the Client ID and Client secret from the app's Settings.
In Glancy, open Connect store → Your own app, enter the store address (
my-store.myshopify.com, or paste the admin address,admin.shopify.com/store/my-store), the Client ID and the secret, and press Connect store. Both are stored encrypted.
Shopify gives such an app a token for 24 hours at a time; Glancy asks for a new one by itself when it runs out. It only works when the app and the store are in the same Shopify organization. If Shopify says the store isn't permitted, create the app from that store's admin.
Connect with Shopify. When Glancy's own Shopify app is available for your store, the dialog also offers Connect with Shopify: enter the store address, approve the app in Shopify, and you're back in Glancy with the store connected, with nothing to copy.
An older custom app. A store that still has a custom app made in its admin before Shopify retired them can keep
using it: pick Older custom app and enter its Admin API access token (shpat_…) and API secret key.
Glancy subscribes to the store's webhooks and verifies each one with the app's secret. From then on it receives:
| Event | When |
|---|---|
Order Completed |
An order is paid. |
Order Cancelled |
An order is cancelled. |
Order Refunded |
A refund is created. |
Signed Up |
A customer account is created. |
| Profile traits | A customer is created or updated (email, name, phone, address). |
Each person is the Shopify customer id (userId), so orders, storefront visits and anything your own code sends
with the same id land on one profile. Shopify retrying a webhook never counts an order twice.
The storefront pixel
The webhooks don't see browsing. For that, copy the pixel from step 2 of Shopify's Install guide in Integrations, and in Shopify go to Settings → Customer events → Add custom pixel: paste it, save and Connect. It sends page and product views, add to cart, checkout started and searches, and ties each visitor to their customer once they sign in or check out. It also carries the landing page's UTMs and click IDs, so ad attribution and ad conversions work for Shopify orders.
Under the pixel's Customer privacy, set Permission to Required with Analytics (it runs once a visitor allows analytics), and Data sale to Data collected does not qualify as data sale.
Headless storefronts
Shopify runs the pixel only on its own theme pages and in its checkout. If your storefront is built on Hydrogen, Next.js or any other custom front end, the pixel sees checkout but none of the browsing before it. To get the whole journey:
Add Glancy to the storefront like any other site, into the same bucket: the script tag, the web SDK or the Next.js SDK.
Identify signed-in customers by their Shopify customer id, the number orders arrive with, e.g.
glancy.identify("7712345678"). Shopify's Customer Account API returns it asgid://shopify/Customer/7712345678: use the part after the last/.Put the visitor's id on the cart as the attribute
_glancy_anonymous_id, with the value ofglancy.getAnonymousId(). Set it when you create the cart, or with the Storefront API'scartAttributesUpdate(in Hydrogen,cart.updateAttributes):mutation { cartAttributesUpdate(cartId: "gid://shopify/Cart/…", attributes: [{ key: "_glancy_anonymous_id", value: "<glancy.getAnonymousId()>" }]) { cart { id } } }The pixel picks it up in checkout and the order carries it, so checkout events and the order land on the visitor who browsed, with the ad click or UTMs that brought them. The underscore keeps it out of the checkout and the order emails. Set it on every cart, before the visitor goes to
checkoutUrl: a cart created without it (a "Buy now" button, a cart from another device) checks out as someone else.Keep the pixel installed for the checkout steps. Shopify keeps the pixel you pasted: when Glancy updates it, copy it again from the Install guide and replace it in Customer events.
The pixel only runs in checkout here, so it never sends a second Product Viewed or Product Added: those come from your storefront's own code, under the names your funnels use.
Where the order came from. The storefront and the checkout are separate visits: the checkout's own landing page
is the checkout itself, with your store as the referrer. So when a checkout carries the visitor's id, Glancy gives
it, and the order, the source of that visitor's most recent visit with one in the 30 days before (the UTMs, ad click
or outside site that brought them): Session source, Medium, Campaign, Content, Term and
Referring domain on Checkout Started and Order Completed show where the sale started. A checkout that
arrives with its own source keeps it: a Klaviyo or Attentive recovery link in an abandoned-checkout email or text
gets the credit. Payment pages (Shop Pay, PayPal, Klarna) don't count as a source. The source is set when the
checkout arrives and doesn't change afterwards; if the storefront's events arrive a little after the checkout's,
Glancy looks again for up to a day.
Orders nobody visited the store for, such as subscription renewals your subscription app creates, have no session
source: they show as (not set). Break Order Completed down by its source property (Shopify's order source,
e.g. subscription_contract_checkout_one for renewals) to tell them apart.
Check that checkout joins the visit
Without the cart attribute, a headless store's data looks like this: product views and add to carts from the
storefront, then Checkout Started from the pixel under a different visitor, so a funnel such as Product Viewed →
Product Added → Checkout Started stops at zero on the third step, and guest orders don't join the visit or the ad
click before it. Signed-in customers still join once Shopify knows who ordered, which can hide the problem.
The store's card in Integrations → Shopify checks it for you over the last 7 days:
- "N of M checkouts joined the storefront visit": working. A few unjoined ones are carts made without the attribute.
- "None of the M checkouts carried the storefront's visitor id": the storefront isn't setting
_glancy_anonymous_id, or sets something other thanglancy.getAnonymousId(). - "Add to carts on your storefront, but no Checkout Started from the pixel": the pixel isn't running. In Shopify, open Settings → Customer events and check that the Glancy pixel is saved and Connected.
- "The pixel in Shopify is an older version": copy the pixel again from the Install guide and replace it. Once the new pixel sends anything, the card says "The pixel is up to date" until the next checkout comes through it.
A visitor counted anonymously (no cookie consent, see the cookie banner) has no visitor id to put on the cart, so their checkout can't join the visit.
Order history
Under History, pick how far back (30 days to 2 years) and press Import history. Glancy reads the store's paid orders and adds the ones it doesn't have yet. Keep the page open until it finishes; you can import again any time, and orders already imported are skipped.
Removing the store
Remove the store on its card removes Glancy's webhooks from Shopify. The events already imported stay. Remove the custom pixel in Shopify too. To pause a store without disconnecting it, turn the Shopify source off instead (see Turning a source off).
Ad platforms
Each ad platform has one page in Integrations with two parts:
- Import spend: connect ad accounts (or import CSV exports) so Glancy can show ROAS, CAC and CPA per campaign. See Ad attribution.
- Send conversions (Meta, Google Ads, TikTok and Taboola): send your purchases, sign-ups and leads to the platform from the server. See Ad conversions.
Ad accounts and destinations have their own controls on that page; turning sources off only applies to event sources.