Skip to content

Analytics & GTM

Bluestars measures your visitors’ BSR segments itself, in your dashboard under Insight & statistics. You do not need to set anything up in Google Tag Manager or Google Analytics for that.

Connect Google Analytics and Google Ads to Bluestars

Section titled “Connect Google Analytics and Google Ads to Bluestars”

Bluestars has measured the bounce rate per BSR type itself since 1 October 2026, on Insight & statistics > BSR statistics: for your whole site and per type, next to its share. A bounce is a visit of one page, without an action and shorter than 10 seconds, the same threshold Google Analytics uses. It needs no Google account, only the measurement script. A dash means too few measured visits for a reliable percentage.

The other way round also works: Bluestars can read your Google Analytics property and your Google Ads account, so the dashboard shows traffic source, bounce rate, engagement time and campaign costs per BSR type, and the help chat can answer questions about them. Nothing is written to Google, and Bluestars reads daily totals only: sessions, engagement, costs and conversions per day, never anything about an individual visitor.

Set it up under Account > Integrations (shown once Bluestars has switched integrations on for your account), card Google Analytics and Google Ads:

  1. Fill in your Google Analytics property ID (Admin > Property settings > Property details, numbers only) and your Google Ads customer ID (the ten digits top right in Google Ads). Save.
  2. The card shows the Bluestars service account address. In Google Analytics, add it under Admin > Property access management with the Viewer role.
  3. Register bsr_pack_key as a custom dimension (Admin > Custom definitions, event scope) if you have not already: that is what splits everything by BSR type. Dimensions do not backfill, so the split starts from that moment.
  4. For Google Ads, Bluestars sends a link request from its manager account to your customer ID once you have saved it (a colleague does this by hand, usually within one working day). Accept it under Admin > Access and security > Managers in Google Ads.
  5. Press “Check access”. The card tells you per account whether it worked and what is still missing (the custom dimension, a link between Google Analytics and Google Ads).

The first numbers arrive after the next nightly sync, with 90 days of history. Two things to know when reading them: Google Analytics finalises a day 24 to 48 hours later, so the last days shift a little; and a number per BSR type counts the sessions in which the widget measured that type, which is a subset of all sessions, so the types do not add up to the total.

Track your own conversions the way you know from Google Analytics: push a command onto a global list. This also works before our script has loaded, so script order does not matter:

window.bluestarsQueue = window.bluestarsQueue || [];
window.bluestarsQueue.push(["track", "purchase", { source: "promo" }]);

The name is lowercase (a-z0-9_., max 40 chars), properties are flat (string, number or boolean, max 8). Once our script has loaded you can also call window.bluestars.track("name", { properties }) directly; if your site already owns window.bluestars, the same function is available as window.bluestarsTrack(...). Goals appear in the dashboard under Insight & statistics > BSR statistics, in the Events part: each goal is its own card there, with the split per BSR segment color, per measured value a clear table of counts per segment color, and the conversion rate against measured visitors, filterable by BSR segment via the color pills.

The value property is reserved: a number (amount in euros, up to 1,000,000) adds up to revenue, in total and per BSR segment. value never appears as its own split; every other property does.

Pageviews themselves live at the top of that same page, in the Traffic part: per page type (home, category, detail, checkout) and per individual page you see how often it was viewed, with each page’s split across the BSR segment colors.

On the thank-you or order confirmation page, push two kinds of goals: one purchase per order (with value = the order total and optionally dimensions such as the payment method) and one purchase_item per order line (with the product name and value = the line total). In the dashboard the two combine into one Purchases card: the conversion rate and revenue per BSR segment at order level, with the Payment method, Product and Quantity per order tables below it:

<script>
window.bluestarsQueue = window.bluestarsQueue || [];
window.bluestarsQueue.push(["track", "purchase", { value: 129.9, payment: "ideal" }]);
// Per order line (repeat per product):
window.bluestarsQueue.push([
"track",
"purchase_item",
{ product: "Gift set", value: 24.95, quantity: 2 },
]);
</script>

You never need to send the BSR segment yourself: the widget already knows the visitor’s segment and attaches it to every tracked goal automatically. The one requirement is that the widget script loads on the same page where you push (see below).

Tips per situation:

  • Your theme already runs on the thank-you page (the widget script is site-wide): the pushes above are all you need.

  • Lightspeed eCom (C-Series): the theme (and with it the widget script) does not load on the thank-you page. In Settings > Web extras > Tracking, add both the pushes and a loader that loads the widget there anyway:

    <script>
    window.bluestarsQueue = window.bluestarsQueue || [];
    window.bluestarsQueue.push(["track", "purchase", { value: {{ order.information.price_incl }}, payment: "{{ order.information.payment_method }}" }]);
    {% for product in order.products %}
    window.bluestarsQueue.push(["track", "purchase_item", { product: "{{ product.name }}", value: {{ product.price_incl }}, quantity: {{ product.amount }} }]);
    {% endfor %}
    </script>
    <script>
    (function () {
    if (document.querySelector('script[src*="widget/bluestars.js"]')) return;
    window.__BLUESTARS_WIDGET__ = { tenantId: "YOUR-TENANT-ID" };
    var s = document.createElement("script");
    s.async = true;
    s.src = "https://bluestars.app/widget/bluestars.js";
    document.head.appendChild(s);
    })();
    </script>

    The exact order variable names differ per theme; check them in Lightspeed’s tracking code documentation.

  • Via Google Tag Manager: create a Custom HTML tag with the same pushes (plus the loader if the widget script is not already there) and fire it on your existing purchase or thank-you page trigger. Read the order data from your existing dataLayer variables.

Do not send personal data (no email address, name or address) and no unique values such as an order number: properties are splits, and that is what keeps the statistics aggregate-only.

Some conversions do not happen in the browser: an affiliate commission you fetch days later from a network’s API, or a booking confirmed in your back office. Send those from your own server to POST https://api.bluestars.app/bsr/v1/events, with your account’s API key (API add-on). They land in the same place as your other goals: BSR statistics > Events, per BSR segment, with value added up to revenue.

You send the BSR segment yourself. Read it in the browser at the moment of the click (the bsr-segment-<slug> class on <body>, see Reading the class in JavaScript) and keep it with your own click or order reference. When bsr-segment-unknown is also on the body, the segment is an estimate: do not store it then. We deliberately keep no visitor identifier longer than a day, so we cannot look a visitor up afterwards.

Terminal window
curl -X POST https://api.bluestars.app/bsr/v1/events \
-H "Authorization: Bearer $BLUESTARS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"events":[{"id":"tt-98765","name":"transaction","value":12.5,"segment":"blauw","props":{"partner":"d-reizen"}}]}'
  • id is your own unique reference (for example the network’s transaction id) and only serves to count an event once: send the same id again (within 90 days) and it is listed under duplicates in the response and not counted again. Your sync can simply re-send the same transactions every run.
  • name follows the same rules as track() in the browser; pageview and the widget’s own events cannot be sent.
  • At most 100 events per request and 60 requests per minute. A goal counts on the day we receive it.
  • Here too: no personal data or unique values in props.

The full contract is in the API documentation.

Sending the postcode for better recognition

Section titled “Sending the postcode for better recognition”

Bluestars recognizes visitors through its own ip→postcode database, and that database is self-learning: every postcode a customer types at checkout improves recognition for future visitors from the same internet block. On sites where the widget script loads on the checkout page this happens automatically (the widget passively reads the postcode field; it never changes anything about your form).

If your checkout runs in an external environment where the script does not load (such as the Lightspeed checkout or Stripe), push the order’s billing postcode on the thank-you page:

<script>
window.bluestarsQueue = window.bluestarsQueue || [];
window.bluestarsQueue.push(["postcodeCheck", "1234 AB", "billing"]);
</script>

The third element marks this as the billing postcode (which takes precedence over a diverging shipping address). A foreign address? Add the country code (ISO, two letters) as the fourth element: ["postcodeCheck", "1000", "billing", "BE"]. Without a country code only a full Dutch postcode counts. Privacy: only the internet block (never the full IP address) and the postcode area are stored: the four digits of a Dutch postcode (never the letters), and for a foreign one its country’s area (for example “1000” in Belgium, only “SW1A” in the United Kingdom); see Privacy & cookies.

The widget measures the following events first-party (cookieless, no stored IP address). They appear in the dashboard under Statistics.

EventMeaning
pageviewA page was viewed.
site.searchA visitor searched on the site’s own search box.
site.search_facetA filter the visitor had set when searching.
site.search_unmappedA search was committed but no dimension could be read.
widget.loadedThe embed booted.
widget.not_placedA configured widget found no placement within 10s.
segment.resolvedThe BSR segment resolved.
segment.self_segmentedThe visitor picked a segment via the FAQ.
assistant.shownThe assistant rendered for a visitor.
assistant.opener_shownThe opener rendered.
assistant.starter_clickedA starter chip was clicked.
assistant.message_sentA visitor message was sent.
assistant.product_clickedA product card was clicked.
assistant.link_clickedA link in an answer was clicked.
assistant.ratingA star rating was given.
chat.shownThe chat launcher rendered.
chat.openedThe chat panel opened.
chat.closedThe chat panel closed.
faq.shownThe FAQ widget rendered items.
faq.emptyThe FAQ had no items yet (cold path).
faq.question_openedAn FAQ question was expanded.
content.swappedBSR content adapted on the page.
content.primedA cache miss triggered a variant generation.
campaign.enteredA visitor entered a survey campaign.
conversionCustomer-defined goal via window.bluestars.track().