Analytics
Digize counts a site’s traffic at the edge, with nothing to install. Every request a site answers is logged for the workspace’s Analytics pages, and HTML pages get a small tracker for page views and events. Neither sets cookies.
What’s recorded
Section titled “What’s recorded”- Requests. Every response on a site’s hostnames, including the ones Digize refuses: path, status, bytes, time, referrer and channel, UTM tags, country and city, device, browser and OS, and the bot class. Page requests also carry a visitor hash: a keyed hash of the day, the workspace, the address and the user agent, which changes every day and can’t be turned back into an address.
- Page views and events. The tracker records page views (single-page navigations too), clicks on links and buttons, outbound links, downloads,
mailto:andtel:links, scroll depth (25, 50, 75, 90 and 100%), time engaged, form starts and submits (never the values), rage clicks and script errors. Its session lives insessionStorageand ends after 30 minutes without activity.
Analytics › Settings chooses how much of that a workspace’s sites get:
| Tracking | |
|---|---|
| Full | Requests and the tracker. The default. |
| Requests only | Requests, without the tracker. |
| Off | Requests without visitor hashes, since usage and the traffic shield still count them. |
Addresses listed there as excluded (the workspace’s own office, say) are logged but marked, so reports leave them out, and the tracker’s events from them are dropped.
The tracker
Section titled “The tracker”On a site with full tracking, Digize adds this to the <head> of every successful (2xx) HTML response to a GET:
<script defer src="/_platform/t/<version>.js" data-digize></script>It’s served from the site’s own hostname, and it posts to /_platform/e on the same hostname, at most 120 posts a minute from one address. Both paths are answered by Digize and never reach the site’s Worker. If the page’s Content-Security-Policy allows scripts by nonce, the tag carries the page’s nonce; a policy without one needs to allow 'self' for scripts and connections.
To keep the tracker off one response, answer it with:
x-digize-tracking: offCustom events
Section titled “Custom events”Call digize.track(name, props) from the page:
digize.track("quote_requested", { label: "Wholesale", value: 250 });nameis 1 to 40 letters, digits,_,.,:or-, and can’t be one of the tracker’s own events (pageview,click,rage_click,outbound,download,mailto,tel,form_start,form_submit,scroll,engagement,js_error).labelis up to 120 characters andvaluea number.- Other properties aren’t recorded by Digize; with a Google tag on the page they go to Google with the event.
The tracker loads deferred, so a call made before it has loaded needs a queue, which the tracker plays back when it starts:
<script> window.digize = window.digize || { q: [], track: function () { this.q.push(arguments); }, };</script>Or mark up an element, and a click on it is the event:
<button data-digize-event="add_to_cart" data-digize-label="Cold brew" data-digize-value="1900"> Add to cart</button>Naming forms and leaving things out
Section titled “Naming forms and leaving things out”- A form’s events are named after a hidden
form_id(orformId) field, else itsdata-digize-form,idornameattribute, else where it posts. data-digize-ignoreon an element, or any element around it, leaves its clicks and form events out.- Visitors whose browser sends Global Privacy Control are never tracked. To leave out your own visits, such as the team’s, set
localStorage["digize:ignore"] = "1"in that browser.
Google Analytics 4
Section titled “Google Analytics 4”With a Measurement ID (G-…) in Analytics › Settings, Digize adds the Google tag to the same pages, served through /_platform/g/ on the site’s own hostname, and the tracker sends custom events to it too. Google’s tag sets Google’s own cookies. Without a Measurement ID, /_platform/g/ is an ordinary path of the site.