Push data to Attribuly Quick Start Guide#
Overview#
Attribuly EventJS is a lightweight event tracking library that helps you collect user behavior data from your website. This guide will walk you through the basic installation and usage of EventJS.Prerequisites for Custom-Built Websites#
If you're using a custom-built website (not using platforms like Shopify, Shoplazza, Shopline, WooCommerce), you'll need to obtain your Attribuly pixel ID by following these steps:2.
Log in to your Attribuly dashboard
3.
Navigate to the Integration section in the dashboard
5.
Copy your unique pixel ID from the provided code snippet
6.
Use this pixel ID in the initialization code below
Quick Installation#
Add the following code to the <head> section of your webpage:Basic Usage#
1. Initialization#
2. Event Tracking#
Track Simple Events#
Track Events with Data#
Track Events with Custom Event ID (Optional)#
Supported Event Types#
| Event Name | Description |
|---|
| page_viewed | Page view event, records user page visit behavior |
| product_viewed | Product view event, records user product browsing behavior |
| collection_viewed | Collection view event, records user browsing of product categories, collections, etc. |
| product_added_to_cart | Add to cart event, records user adding products to cart |
| product_removed_from_cart | Remove from cart event, records user removing products from cart |
| cart_viewed | Cart view event, records user viewing cart |
| checkout_started | Checkout started event, records user entering checkout process |
| checkout_completed | Checkout completed event, records user successfully completing order |
| search_submitted | Search submitted event, records user performing search operations |
| lead_form | Lead form submission event, records user submitting marketing lead collection forms |
Important Notes#
The script loads asynchronously and won't block page loading
All calls made before the script loads are queued and executed automatically once loaded
All event data automatically includes device, browser, and other context information
It's recommended to track page view events at the bottom of the page to ensure more accurate page load times
Advanced Features#
Custom Event IDs#
By default, EventJS automatically generates a unique event ID for each event. If you need to use your own event ID system, you can specify it as follows:Single Event with Custom Event ID#
Batch Events with Custom Event IDs#
Batch Events with Global Default Event ID#
Implementation Best Practices#
1.
Place the script in the <head> section for optimal loading
2.
Initialize with your unique pixel ID obtained from the Attribuly dashboard
3.
Track page views at the bottom of the page or when the DOM is fully loaded
4.
Use descriptive event names that clearly indicate user actions
5.
Include relevant event data to provide context for analysis
6.
Implement error handling for critical event tracking
7.
Test event tracking to ensure data is being collected correctly
8.
Respect user privacy and comply with data protection regulations
Troubleshooting#
Events not appearing: Check your pixel ID and network connection
Duplicate events: Ensure events are only tracked once per user action
Performance issues: Use batch tracking for multiple events to reduce network requests
Data inconsistency: Verify event data structure matches expected format
Modified at 2026-03-16 09:53:43