Magic: Automatic Event Detection
Automatic Event Detection
What Magic Does
Magic reads the events and contact details your website already sends to its dataLayer or gtag, and lists them in Tracklution as items (Event type or Contact Info type items). You can review each item and choose which ones Tracklution should start tracking.
Magic does not detect raw clicks or form submissions on its own. If an interaction is not pushed to the dataLayer or sent with gtag, it will not appear in the list.
Nothing is sent to your connected platforms until you activate an item. Detected items are still stored with a hit count and example values, whether you activate them or not. For Contact Info items, the example values are real email addresses, phone numbers or names, visible to everyone with access to the container.
Magic is an experimental feature. Some listed items may already exist in your tracking. Tracking the same item through both a standard setup and through Magic can lead to duplications of the item, so review the list carefully before activating anything.
Install the Tracklution Main Script
Magic works with the Tracklution Main Script, with or without PageViews. You can install it by adding the Main Script to your website or theme code manually, through a plugin, or using a tag manager like GTM.
On Shopify, the Tracklution pixel runs inside Shopify's customer events sandbox and cannot see your theme's dataLayer. Magic therefore only lists what is pushed inside that events sandbox, not your store's own dataLayer events.
Items appear in the list only after they have happened at least once on your site with the Main Script installed. If the list is empty, perform a few actions on your site that push events to the dataLayer, such as adding a product to the cart.
Review Detected Items
- Open your container and select the Magic tab.
- Review the list of detected items. Each row shows:
| Column | What it shows |
|---|---|
| Field | The event name or contact field |
| Type | Event or Contact Info |
| Count | How many times the item has been detected |
| Activate | Toggle to start or stop tracking the item |
- Click the expand arrow on a row to see example values with date and time, newest first. While an item is not activated, only a sample of its hits is kept as examples.
Event names are shown in PascalCase. For example, purchase becomes Purchase and begin_checkout becomes BeginCheckout. Names are not renamed to platform standard events: view_item becomes ViewItem, not ViewContent. Names that contain spaces are kept as they are. You can edit the event name output using Event Creation Rules or Event Mappings under the Settings tab.
The count is exact up to 100. Above that it is approximate, so use it to see how often an item occurs, not to reconcile numbers.
Activate Listed Items
To activate a single item, turn on its Activate toggle. A green check icon appears next to the field name.
Once activated:
- Events are tracked like any other event and sent to your connectors through Event Mappings. Check that the event name is mapped for each connector, because Magic keeps the name from your dataLayer.
- Contact Info fields are added to the visitor's contact details and used to improve matching on their events.
- Ecommerce data in the push, such as value, currency, items and transaction ID, is included with the event.
- Only hits after activation are tracked. Earlier detections are not sent.
To stop tracking an item, turn its toggle off. The row returns to pending, and its examples and count are kept.
Activate or Dismiss New Items in Bulk
When new items are detected, container admins see a banner N new event types detected with the new field names. The banner also includes new Contact Info fields.
- Activate immediately turns on every item in the banner at once, Contact Info fields included, and closes the banner.
- Dismiss closes the banner without activating anything. It appears again when the next new item is detected.
If your onboarding method was Automatic Event Detection, the Magic tab also shows a badge with the number of new items to review.
Check the list before using Activate immediately. Activating items that you already track elsewhere can cause duplicate events.
Avoid Double Tracking
Do not activate an event in Magic if you already track it through Google Tag Manager, Shopify, WooCommerce, manual code or another integration.
Events get a new event ID on every hit, so they are not deduplicated against your other tracking, meaning the same event can get counted twice. The only exception is Purchase on WooCommerce containers: an activated Purchase that carries a transaction ID uses it as the event ID, so it is deduplicated with the WooCommerce Purchase for the same order.
How Consent Is Handled
Consent signals found on your site, for example gtag('consent', ...) or Usercentrics, are not listed in Magic. They are applied only when Use automatic consent reading is turned on in Settings → Advanced Settings. The setting is off by default on new containers.
On Shopify containers this setting has no effect on Magic: gtag-style consent from the dataLayer is ignored, and Shopify's own customer privacy consent is always used.
Who Can Change Magic Settings
| User | What they can do |
|---|---|
| Container admin | View the list, activate and deactivate items, use Activate immediately and Dismiss |
| View-only user | View the list. Toggles show as View-only access, and the new-items banner is not shown |
| Demo container or user | View the list. Toggles show as Disabled in demo mode, and the new-items banner is not shown |
Magic AI Engine (Pilot)
A separate Magic page that learns detection rules for your events and finds new triggers such as calls, forms and downloads is currently available to pilot containers only. Pilot containers see a link to it at the top of the Magic tab.
- Send us a request if you would be interested to pilot the Magic AI Engine with us.
Troubleshooting
An event I expect is not in the list. Check that the event is pushed to the dataLayer or sent with gtag, and that it has happened at least once since the Main Script was installed. Events with names starting with gtm. are ignored. On Shopify, events from your theme's dataLayer are not visible to Magic unless the Main Script is installed into the theme.
A gtag event is missing. gtag events whose send_to is the Measurement ID of your Tracklution GA4 connector are not listed, because Tracklution sends events in that exact format itself. The same event without send_to, or with a different ID, is listed.
An activated event does not reach a platform. Check Event Mappings for that connector. Magic keeps the name from your dataLayer, for example ViewItem, which may need its own mapping.
I see a page or option not described here. Magic itself is in Beta, and some Magic features are in the new Magic AI Engine pilot and may not be visible on every container.




