Event Tagging is the vital link between customer behavior and your shop's performance. Whether implemented via our frontend script or integrated directly through a server-side API, capturing interactions like clicks, cart additions, and purchases is what transforms a static search tool into a self-learning discovery engine.
By establishing this feedback loop, you ensure your shop benefits from:
- Essential data layer: Create a robust foundation of behavioral data that serves as the basis for all search and navigation optimizations.
- Smart insights: Unlock advanced reporting capabilities that move beyond simple page views to reveal deep, interaction-based performance metrics.
- Stronger personalization: Move from generic results to dynamic experiences that are automatically tailored to your customers' actual shopping behavior.
- Platform independent: Ensure a smooth integration regardless of your tech stack, as the tag is designed to work with any technical setup.
- Future-ready setup: Position your shop to immediately leverage upcoming Tweakwise features and innovations without further development.
Implementation
Because every platform is different, there isn’t a single way to set it up. The good news: we’ve got clear documentation for each situation.
Use the links below to quickly find the right documentation for your setup. Whether you’re running on Magento, Shopify, your own custom platform, or working with Google Tag Manager, you’ll be directed straight to the correct implementation path.
Native support
If you're using one of these platforms, enabling Event Tag is easy! Choose your platform to get instructions how to enable Event Tag;
Custom implementation
If you have a custom webshop or SaaS platform, choose between JavaScript (client-side) or API/server-side implementation. If you have preference to work with Google Tag Manager, you can decide whether to use the client-side tag or a server-side tag manager approach.
| Platform / Setup | Recommendation |
|---|---|
| Custom webshop or SaaS platform | Client side |
| Custom webshop (API integration) | Server side |
| Google Tag Manager (client-side) | Client side |
| Server-side Tag Manager | Server side |
Looking for code?In the specific documentation for our tags, we have added a code block with two tabs: one with example code for the client-side implementation, and one with example code for the server-side implementation.
Help me choose
The table and flowchart below will help you pick the right starting point:
---
config:
layout: dagre
---
flowchart TB
B["Platform"] -- <br> --> C["Magento"] & M["Shopware"]
D["Use Customer Events"] --> I["Use Event Tag Client-side"]
H{"GTM Server<br>Container?"} -- NO --> I
H -- Yes --> J["Use Event Tag Server-side"]
M --> n3["Enable Events Setting"]
B --> n4["Headless/custom/other"] & n5["Shopify"]
n4 --> E{"Server-side <br>preference?"}
n5 --> D
C --> n6["Headless"]
n6 -- No --> n9["Enable Events Setting"]
n6 -- Yes --> E
E -- No --> H
E -- Yes --> n7["Use Event Tag Server-side"]
n8["Start"] --> B
B@{ shape: diam}
n6@{ shape: diam}
n7@{ shape: rect}
n8@{ shape: text}
style B fill:transparent
style C fill:#FFF9C4
style M fill:#FFF9C4
style D fill:transparent
style I fill:#C8E6C9
style H fill:transparent
style J fill:#C8E6C9
style n3 fill:#C8E6C9
style n4 fill:#FFF9C4
style n5 fill:#FFF9C4
style E fill:transparent
style n6 fill:transparent
style n9 fill:#C8E6C9
style n7 fill:#C8E6C9
The request ID
Some events require a requestid. The requestid is our way to connect events to requests done by the user. This enables us to analyze the configuration and performance of your instance.
Every API request returns this request identifier as the twn-request-id response header.
Example:
Case sensitivityAlways send HTTP headers in lowercase. Although HTTP/1.1 treats header names as case-insensitive, HTTP/2 requires all header field names to be lowercase. Many HTTP clients, servers, proxies, and CDNs enforce this rule, so using lowercase ensures compatibility across protocols and prevents unexpected request failures.
Using Google Tag Manager?When implementing the Tweakwise event tag in Google Tag Manager (GTM), you need to store the requestId from the Tweakwise navigation-search response and pass it to the dataLayer.
This allows you to use the requestId in your GTM tags and triggers.
The profile key
Customer identification is done through a profile key. This is our way to identify your customers using a unique identifier.
You can determine the profile key yourself. Generally account id's are used for logged-in users and visitor-id's for anonymous users.
Format
The profile key should be a string with a maximum length of 100 characters.
Accepted characters:
- A-Z or a-z
- 0-9
- Dash (-)
Profile keys with other characters will not be processed correctly.
If no profile key is supplied, our Tweakwise Analytics JS will generate a unique identifier for the current user.
WarningThe use of personal information such as email addresses, phone numbers, or other personal information as profile keys is not permitted in order to comply with GDPR guidelines.
Only use anonymized data such as ID numbers or hashed values. By following the GDPR guidelines, you meet the requirements for the protection of users and data.
Pass the profile key to the Tweakwise requests too!For a correct working of A/B-tests and personalization it's essential to pass the same profile key to your Tweakwise Delivery API endpoints too (tn_profilekey). Using one of our extensions? If personalization is enabled, this is automatically done for you.
FAQ
What’s the difference between Google Analytics and the Tweakwise Event Tag?
Google Analytics is your analytics tool. You decide what data to collect and how to use it. Tweakwise Event Tag is designed for insights within Tweakwise. It defines what data should be sent so we can provide reports and performance insights. You’re responsible for sending the events, but we specify what’s needed.
Do I still need Google Analytics?
Yes.
Tweakwise Event Tag helps improve and analyse Tweakwise performance, but it doesn’t replace Google Analytics. You’ll still need Google Analytics for broader website analytics, user behaviour, and marketing results.
I get the message 'No Click Data Available'. What to do?
It looks like your events are not processed properly. Check the dashboard in Tweakwise app for warnings about your event tag. Check the meaning of every warning on de documentation page of the corresponding event.
