Appearance
Integrate Insights
To track the impact of your content, integrate the axite script — the axite Tag — into your site and use it to send events back to axite.
Data protection
The axite Tag does text tracking, not user tracking — no personal data, IP addresses anonymized on receipt, only functional cookies, and no cookie-banner consent required (§ 25(2) TDDDG). Details: Security & data protection and the Data protection FAQ.
The quick start below covers the common case: product pages — one product per page, where you want to track views and conversions. For other layouts and finer attribution, see the details further down.
Quick start (product pages)
Replace these placeholders everywhere they appear — you'll find them in your Content Engine's settings:
yourOrg/yourPipeline— your engine's pipeline idyourDataPool— the data pool that holds your products
Match the SKU to your data
The tag reads the product's sku from the page's structured data (JSON-LD @type: Product). That sku must match the object uid in your data pool — that's how axite links the page to the right content. If they don't match, events aren't attributed.
Add the script directly
Add this to your product-page template:
html
<script>
window.axite = window.axite || { q: [] };
axite.init = axite.init || function () { axite.q.push(['init'].concat([].slice.call(arguments))) };
axite.logEvent = axite.logEvent || function () { axite.q.push(['logEvent'].concat([].slice.call(arguments))) };
(function () {
var s = document.createElement('script');
s.src = 'https://impact.axite.app/axite.v1.js';
s.async = true;
document.head.appendChild(s);
})();
axite.init({ pipeline: 'yourOrg/yourPipeline', dataPool: 'yourDataPool', trackUniqueViews: true });
axite.logEvent('view');
</script>Record a conversion (e.g. add-to-cart) wherever it happens:
html
<button onclick="axite.logEvent('conversion')">Add to basket</button>Or via Google Tag Manager
Or just invite us
You don't have to build it yourself. Invite us to your GTM container during onboarding and we'll set up and test the tag for you — ask your axite contact.
Create a Custom HTML tag, paste the snippet below, and fire it on all product pages (a trigger matching your product-page URLs). The static autodetect setup means one tag covers them all — it reads the sku from JSON-LD and the language from <html lang>.
html
<script>
window.axite = window.axite || { q: [] };
axite.init = axite.init || function () { axite.q.push(['init'].concat([].slice.call(arguments))) };
axite.logEvent = axite.logEvent || function () { axite.q.push(['logEvent'].concat([].slice.call(arguments))) };
(function () {
var s = document.createElement('script');
s.src = 'https://impact.axite.app/axite.v1.js';
s.async = true;
document.head.appendChild(s);
})();
axite.init({ pipeline: 'yourOrg/yourPipeline', dataPool: 'yourDataPool', trackUniqueViews: true });
axite.logEvent('view');
</script>Track conversions with a second Custom HTML tag on your conversion trigger:
html
<script>axite.logEvent('conversion');</script>If you can expose the axite contentId in a Data Layer variable, pass it for the most precise tracking instead of relying on autodetect:
html
<script>axite.init({ pipeline: 'yourOrg/yourPipeline', contentId: {{axite Content ID}} });</script>Content Security Policy
If your site enforces a Content-Security-Policy, allow the tag to load and to send its data:
script-src https://impact.axite.app— loadsaxite.v1.js.connect-src https://*.api.axite.app— the tag sends impact beacons tohttps://{your-org}.api.axite.app. Use your org's own subdomain, or the wildcard.
Running experiments? The tag also fetches variant content, so add the content domain to connect-src as well:
connect-src https://impact.axite.app
A combined header (impact tracking + experiments):
Content-Security-Policy: script-src 'self' https://impact.axite.app;
connect-src 'self' https://*.api.axite.app https://impact.axite.app;Logging events
To send an event, call axite.logEvent(eventType, options). Event types are view, conversion (entirely customer-defined — e.g. add-to-cart), and return. Unique views are tracked from view events when trackUniqueViews is on.
logEvent() is designed to survive page navigation, so calling it as the onclick handler of a link or submit button works fine. See the API for details.
Tracking unique visitors/views
axite impact tracking does neither store (client or server side) nor send any data that can be used to identify individual users by default. However, you can enable tracking of unique views by setting trackUniqueViews: true in the axite.init() call. This will store visited content ids client side only and send back only the timestamp of the previous view to the server when the view event is sent. No user ids or other personal data is sent or stored on our servers. If you explicitly set trackUniqueViews: false, all existing data that is saved client side will be deleted.
Traffic sources
axite attributes views to where they came from by interpreting each event's referrer and URL query string (e.g. utm_* parameters), grouping them into sources and categories — search engines, answer engines, social media, ads, and more — so you can see which channels drive content performance. This works from the standard view events; no extra setup.
Associating events with data
To better understand the impact of your content, link events to data in axite, and correlate changes in impact with changes in your engine, you should set up your script with additional parameters. axite can and will track impact events if you don't provide these, but you won't be able to see the impact of your content in the context of your engine.
TIP
We recommend setting contentId whenever possible.
Content ID
Each piece of content in axite has a unique content id, which can be used to track the data it was generated with and how it was generated, like a ruleset or an LLM. Whenever possible, set the contentId parameter in the axite.init() call for the best possible insights.
js
axite.init({
pipeline: 'yourOrg/yourPipeline',
contentId: '1234'
});Object UID
To match events to data in axite, you can set the dataPool and objectUid parameters in the axite.init() call.
js
axite.init({
pipeline: 'yourOrg/yourPipeline',
dataPool: 'yourDataPool',
objectUid: 'yourObjectUid'
});Autodetect Object UID
We can also try to autodetect the uid on each page the script is loaded for easier integration. You still need to set the dataPool parameter, but with this approach the tag integration is completely static (the same on every page).
js
axite.init({
pipeline: 'yourOrg/yourPipeline',
dataPool: 'yourDataPool'
});Autodetect currently looks for structured data / JSON-LD of @type: Product and uses the sku property as the object uid. If you have a different structure, let us know and we can add support for it.
Autodetect Language
If you don't set contentId, language is autodetected from the page's language (<html lang> attribute). You'll rarely need to set it manually, but you can override the autodetected language with the language parameter.
js
axite.init({
pipeline: 'yourOrg/yourPipeline',
dataPool: 'yourDataPool',
objectUid: 'yourObjectUid',
language: 'yourLanguage'
});Updating config on the fly
If you want to change the config after calling init — for example to enable trackUniqueViews after the user has approved tracking — call axite.init() again with the new config. It's merged with the existing one.
js
axite.init({ trackUniqueViews: true });API
axite.init(config)
Initializes the axite script with the given configuration.
| Parameter | Description |
|---|---|
config: Config | configuration object |
ts
type Config = {
pipeline: string
trackUniqueViews?: boolean // optional, default: false
contentId?: string // takes precedence over dataPool and objectUid
dataPool?: string
// autodetectable
objectUid?: string
language?: string
//
params?: string[]
}axite.logEvent(eventType, options)
Sends an event to the axite platform.
| Parameter | Description |
|---|---|
eventType: string | One of 'view', 'conversion', 'return' |
options? : {contentId: string} optional | Key contentId: provide or override content id on a per-call basis |
js
axite.logEvent('conversion');axite.printDebug()
Print debug information to the console. Useful when testing the integration, especially with autodetect.
More to Come
Bundling your frontend and already using npm packages? Let us know and we'll provide an axite npm package to simplify script loading.