Skip to main content
ACI’s browser collector captures first-party events used by behavior-based audiences, experiments, and reporting. It is served from your site at /_aci/aci.js and sends events to the same-origin /collect endpoint.
Access: Must be enabled for your organization. Contact your Gradial team to get access.
Collection requires a personalization-enabled Gradial edge binding. A standalone framework server can render the script tag, but it does not provide the hosted collector endpoint or visitor identity.

Enable collection

Add or update the personalization block in .content/config/site.json:
ACI’s Astro and Next.js integrations emit the collector tag automatically:
Do not add a second copy to an ACI-rendered site. If you maintain a custom renderer, emit the tag once in the document head and keep the stable /_aci/aci.js path. ACI supports these consent presets: consentCategories maps the categories used by your consent manager to ACI’s personalization purpose. A preset connects to a consent manager already running on the page; it does not install a banner or define your policy. If a site does not use another consent manager, select manual and mount the supplied banner from your layout. In Astro, place this script near the end of the document body:
The component exposes ACI CSS classes so you can style the banner to match your site. Review its copy and behavior with your privacy team before deployment. With consentPreset: "manual", grant the personalization purpose after a visitor opts in:
Withdraw consent with an empty purpose list:
If your privacy UI can run before the deferred collector loads, define a small queue first:
Manual consent calls are only authoritative in manual mode. For a named preset, update consent through that provider.

Track a custom event

Use the browser API for application-driven events:
ACI records the canonical name as custom.request-demo. For markup-driven interactions, use data attributes:
Track the first time an element becomes visible with data-aci-on="visible":
data-aci-on supports click and visible; click is the default. Attribute properties are sent as strings.

Built-in events

The collector records supported browser events such as page views, link clicks, variation views, and web-vital measurements. Use custom events for business actions that your audience criteria or goals need to identify explicitly.
Keep event names stable and describe one observable action. Prefer request-demo over a UI-specific name such as blue-button-clicked.
Behavior-based audience membership requires the configured consent and a usable first-party identity. If either is unavailable, ACI returns the base audience experience. Anonymous experiments can be configured to assign and measure visitors without creating a personalization profile. Supported browser privacy signals, including Global Privacy Control and Do Not Track, suppress identity-dependent processing. ACI provides the technical controls; your organization remains responsible for selecting purposes, categories, retention, disclosure, and deletion behavior that match its policy and legal obligations.

Export or erase an audience profile

ACI provides authenticated operations for a first-party profile identified by its ACI ID. Resolve and verify that ID through the privacy-request workflow agreed during onboarding; do not substitute an email address or another application identifier. Use the read operation to export the profile and confirm it belongs to the intended visitor:
Use the delete operation to erase that profile and its associated personalization data:
Profile erasure through this endpoint cannot be undone. Confirm the ACI ID, authorization, and required record of approval before sending the request.
Export requires read permission; erasure requires write permission. Treat exported profile data as sensitive, record the request according to your organization’s process, and verify the returned erasure result before closing the request.

Verify the integration

1

Inspect the rendered page

Confirm there is exactly one /_aci/aci.js script and that its consent preset and categories match site configuration.
2

Exercise the real consent UI

Grant and withdraw through your configured consent manager or manual integration. Confirm the UI returns to the expected state on a new page load.
3

Trigger a known event

Use a test interaction with data-aci-event or aci('track', ...) and confirm the page remains functional even if collection is unavailable.
4

Verify on an edge-backed environment

After consent, use browser developer tools to confirm same-origin requests to /collect. A local framework server does not prove this step.
5

Test the fallback

Repeat the journey without consent and confirm identity-dependent audience content is not selected.

Troubleshooting

Confirm the site is using its personalization-enabled Gradial edge binding. The route is not supplied by an ordinary framework server.
Confirm personalization.collect is true and that your ACI layout uses the current Astro or Next.js integration. Custom renderers must emit the tag once.
Check consent first, then confirm the expected event reached /collect, the segment and audience are enabled, and the updated membership is present on a later request.

Next: Experiments and Reporting →