How Installation Works
DATALYR uses a lightweight JavaScript snippet that you add to your website’s<head> section. Once installed, it automatically:
- Tracks page views and sessions
- Captures UTM parameters and ad click IDs
- Identifies returning visitors
- Sends events to your dashboard in real time
Installation Methods
Choose the method that matches your platform:No-Code Platforms
Webflow
Add the tracking script to your Project Settings. Takes 2 minutes.
WordPress
Paste the script in your theme’s header or use a plugin. Takes 3 minutes.
Shopify (App Store)
Install from the Shopify App Store. Easiest method. Takes 5 minutes.
Shopify (Manual)
Add manually to your theme. For custom setups.
Framer
Add as a custom code component in Site Settings. Takes 2 minutes.
Wix
Add to Tracking & Analytics section in Settings. Takes 3 minutes.
Squarespace
Inject code in Advanced → Code Injection. Takes 2 minutes.
Code-Based Platforms
Custom HTML
Add the script tag directly to your site’s HTML. Works with any static site.
Next.js
Add to your root layout or _app file. Supports App Router and Pages Router.
What You’ll Need
Before installing, make sure you have:- Your DATALYR workspace ID (found in Settings → Tracking)
- Access to edit your website’s code or settings
- About 5 minutes
The Tracking Script
Your tracking script looks like this:- The
deferattribute loads the script without blocking your page - Replace
YOUR_WORKSPACE_IDwith your actual workspace ID from the dashboard - The script is under 15KB and loads asynchronously
Installation Steps
- Get your tracking code from Settings → Tracking in your DATALYR dashboard
- Choose your platform from the guides above
- Add the script to your site’s
<head>section - Verify tracking works by visiting your site and checking for events in your dashboard
After Installation
Once the script is installed: Verify Tracking Visit your website and check your DATALYR dashboard. You should see apage_view event within seconds.
Learn how to verify →
Track Custom Events
Add code to track button clicks, form submissions, purchases, and more.
Learn about custom events →
Connect Integrations
Link Shopify, Stripe, Meta Ads, Google Ads, or TikTok Ads.
Browse integrations →
What Gets Tracked Automatically
Once installed, DATALYR automatically captures: Page Views Every page visit with URL, title, and referrer. Visitor IDs Persistent anonymous IDs stored in cookies (survives across sessions). Sessions 30-minute session windows with session IDs. Attribution Data- UTM parameters (source, medium, campaign, term, content)
- Ad click IDs (fbclid, gclid, ttclid, etc.)
- Referrer information
- Landing pages
- Browser and OS
- Screen resolution
- Device type (desktop, mobile, tablet)
- Timezone
Privacy & Compliance
DATALYR respects user privacy:- No personal data collected by default
- Respects Do Not Track (DNT) browser settings
- Supports opt-out via
__dl_opt_outcookie - GDPR and CCPA compliant
Performance
The DATALYR tracking script is designed for speed:- 15KB gzipped - Lightweight and fast
- Async loading - Doesn’t block page rendering
- Edge-optimized - Served from global CDN
- Smart batching - Events sent in batches to reduce requests
Troubleshooting
Not seeing events?- Check that your workspace ID is correct
- Make sure the script is in the
<head>section - Disable ad blockers and try again
- Check browser console for errors