Custom Tracking (Event Tracking)
Konektor features an advanced automatic tracking system. Before adding manual tracking, it is important to understand what is already tracked automatically.
Auto-Tracking vs Manual
✅ Link Rotator (Automatic)
If you are using Konektor Link Rotator (e.g., link.brand.com/wa/cs-ratna) on your landing page, you DO NOT NEED to add any tracking code.
- Clicks are tracked automatically as
ViewContent/Click. - WhatsApp Redirects are tracked automatically.
- Conversions are tracked when detailed conversations occur.
🛠️ Custom Tracking (Manual)
Use the guide on this page ONLY if you want to track interactions other than the Link Rotator, such as:
- "Add to Cart" buttons.
- Website registration forms.
- E-book / PDF downloads.
- Links to Marketplaces (Amazon/Shopee).
Summary
Using Link Rotator? It's Automatic. Using other buttons? Use Custom Tracking below.
Method 1: CSS Classes (Easiest)
This method is perfect for non-technical users. You simply need to add a special class name to the HTML element you want to track.
Usage
The class format used is k-event-{EventName}.
Examples:
k-event-AddToCartk-event-Leadk-event-Contact
1. Track Button Clicks
Add the class to a button or link. When a user clicks the button, the event will be sent.
<!-- Track 'AddToCart' event when button is clicked -->
<button class="btn btn-primary k-event-AddToCart">
Add to Cart
</button>
<!-- Track 'Contact' event when WhatsApp link is clicked -->
<a href="https://wa.me/62812345678" class="k-event-Contact">
Contact Us
</a>
2. Track Form Submissions
Add the class to the <form> element. Konektor will automatically track when the form is successfully submitted.
Smart Identification Feature: When a form with a tracking class is submitted, Konektor automatically detects and captures data:
- Email (from inputs named
email,mail,surel) - Phone (from inputs named
phone,tel,mobile,wa,hp) - Name (from inputs named
name,fullname,nama)
This ensures your Lead data is captured completely without additional coding.
<!-- Track 'Lead' event & auto-capture email/name data -->
<form class="k-event-Lead" action="/thank-you">
<input type="text" name="nama" placeholder="Full Name">
<input type="email" name="email" placeholder="Email Address">
<button type="submit">Sign Up Now</button>
</form>
3. Track Specific Pages (Page Load)
If you want to trigger a custom event when a specific page is opened (e.g., a "Thank You" page), add the class to the <body> tag.
<body class="k-event-Purchase">
<!-- Page content -->
</body>
Method 2: Data Attributes (Advanced)
Use this method if you need more detailed control or want to include dynamic data (like product price, transaction ID, etc.).
Available Attributes
data-k-event: Event name (required).data-k-props: JSON object containing additional properties (optional).
Implementation Examples
Track Purchase with Value
<button
id="checkout-btn"
data-k-event="Purchase"
data-k-props='{"value": 150000, "currency": "IDR", "order_id": "ORD-123"}'>
Pay Now
</button>
Dynamic Links
<a href="/promo"
data-k-event="ViewContent"
data-k-props='{"content_name": "Holiday Promo Bundle", "content_id": "PROMO-01"}'>
View Promo
</a>
data-k-props is valid. Use double quotes (") for keys and string values, and wrap the entire JSON object in single quotes (').Other Automatic Features
Konektor has several "magic" features running in the background to assist your tracking.
1. WhatsApp Link Decoration
The Konektor script automatically detects links to WhatsApp (wa.me or whatsapp.com) and appends a unique Visitor Code to the preset text message.
Illustration:
- Original Link:
https://wa.me/6281...?text=Hello - Link after user click:
https://wa.me/6281...?text=Hello [K-X7Y9Z]
This [K-X7Y9Z] code allows your CS team to identify the user in the Konektor dashboard.
2. Auto Link Decoration (Cross-Domain)
If you link to another domain that also uses Konektor (or registered custom domains), the script automatically appends parameters like visitor_code, gclid, fbclid, etc., to the destination URL. This keeps the user session connected across domains.
Troubleshooting
Event Not Appearing in Dashboard?
- Check Internet Connection: Ensure no adblocker is blocking the Konektor script.
- Inspect Element: Use "Inspect" in your browser, look at the "Network" tab, and filter by "konektor". Check if there is a request to
v1/trackwhen the button is clicked. - Check Class Naming: Ensure the prefix is
k-event-(case-sensitive according to the event, but usually the script handles this). It is recommended to use standard CamelCase events (e.g.,AddToCart, notaddtocart). - Validate JSON: If using Data Attributes, ensure the JSON is valid.
Testing Tips
Use console.log in your browser to debug manually if needed, or check the Conversions > Sync Logs tab in the Konektor dashboard to see incoming events.
Need More Help?
Our team is ready to help you maximize ad tracking and business attribution.
© 2026 Konektor. All rights reserved.
