One line of code – and everything else as you need it
The tracking code is about 5 KB compressed and runs on any website. For events, login, e-commerce and server-side data there is a lean JavaScript API and a server API.
<script defer src="https://visualclicks.de/t/fwa.js" data-site="vc_…"></script>
Events, properties and login
Send your own events such as searches, downloads or clicks with fwa.track(), and extra information with fwa.set() – for the event, the page, the session or permanently for the user. After login, fwa.identify() links the session to your customer number.
Every new property appears automatically in the property registry and is then available in filters, cards and segments.
// event with properties
fwa.track('search', { query: 'tent', results: 12 });
// property for the whole session
fwa.set('customer_type', 'vip', { scope: 'session' });
// link the login, log out
fwa.identify('cust_4711');
fwa.reset();
// consent from your cookie banner
fwa.consent.grant(['analytics', 'recording']);
The purchase process as events
The e-commerce API follows the structure of Google Analytics 4: product view, cart, checkout, shipping, payment, purchase and refund, each with items, brand, categories, price and quantity.
If your shop already has a GA4 data model, moving it over takes little effort.
fwa.ecommerce.viewItem({ item_id: 'ZT-100', item_name: 'Trekking tent',
item_brand: 'NordCamp', item_category: 'Tents', price: 249 });
fwa.ecommerce.addToCart({ item_id: 'ZT-100', price: 249, quantity: 1 });
fwa.ecommerce.beginCheckout(items, { value: 249 });
fwa.ecommerce.purchase(items, { transaction_id: 'A-1001',
value: 249, tax: 39.76, shipping: 0, currency: 'EUR' });
Orders and AI crawlers straight from your server
With a server key from the settings, your backend sends events directly to VisualClicks – independent of browser, ad blocker and consent. Orders are merged with the browser data through the order number.
You report AI crawler requests the same way, or upload an access log in “combined” format.
- Several keys per website, revocable one by one
- A key is shown only once and stored only as a hash
- IP exclusions for internal traffic
curl -X POST https://visualclicks.de/api/s/v1/events \
-H "Authorization: Bearer vcsk_…" \
-H "Content-Type: application/json" \
-d '{"source":"server","e":[{"t":"ecommerce","n":"purchase",
"u":"https://shop.example/thank-you",
"x":{"transaction_id":"A-1001","value":249}}]}'
Asynchronous
Loads with defer, never blocks the page
Single-page apps
Page changes via the History API automatically
No code needed
Track clicks with data-fwa-event
Several websites
Own code and settings per website
Frequently asked questions
Where do I add the tracking code?
In the <head> of every page – in most CMS and shop systems through the theme or a field for custom scripts. The code loads asynchronously and does not block the page.
Does it work with single-page apps (React, Vue, Next.js)?
Yes. Page changes through the History API are captured automatically as page views.
How do I track button clicks without coding?
With the data-fwa-event attribute on the element, for example data-fwa-event="newsletter_click". Add extra properties with data-fwa-prop-….
What is a server key for?
It lets your server send events directly: orders, refunds or AI crawler requests. Server keys never belong in your website’s source code and can be revoked one by one.
Ready for the first line of code?
Request your access. After that, one line of tracking code is all it takes – the first visits show up in real time.