Use Cases
Landing Pages Track ad campaign performance for product launches, waitlists, and marketing campaigns. Portfolios & Agency Sites Monitor visitor behavior, traffic sources, and contact form conversions. SaaS Marketing Sites Track signups, demo requests, and trial conversions from paid ads. Product Pages See which ads drive the most engagement and conversions on product pages.Before You Start
- You have a DATALYR account
- You’ve created a workspace
- You have a Framer site (free or paid plan)
- You have edit access to your Framer project
Step 1: Get Your Tracking Code
- Log in to your DATALYR dashboard
- Go to Settings → Tracking
- Copy your tracking script:
Step 2: Add to Framer Site Settings
- Open your Framer project
- Click the Settings icon (gear) in the top toolbar
- Go to the General tab
- Scroll down to Custom Code
- In the Start of
<head>tag section, paste your DATALYR tracking script - Click outside the text area to save
Step 3: Publish Your Site
The tracking script only runs on your published site, not in the Framer editor preview.- Click Publish in the top right
- Confirm your site settings
- Click Publish
Step 4: Verify Tracking Works
- Visit your published Framer site in a new browser tab
- Go back to your DATALYR dashboard
- Click Events in the sidebar
- You should see a
page_viewevent within 10 seconds
What Gets Tracked Automatically
Once installed, DATALYR automatically captures:- Page views on all pages
- Visitor IDs (persistent across sessions)
- UTM parameters from ad campaigns
- Ad click IDs (fbclid, gclid, ttclid)
- Referrer and traffic source
- Device and browser information
Track Framer Form Submissions
To track form submissions, add a custom code component to your form’s success state:Using Framer’s Built-in Forms
- Select your form element in Framer
- Add a Custom Code component below the form
- Paste this code:
- Replace
'Contact Form'with your actual form name - Publish your site
Track Button Clicks
Track specific button clicks or interactions:[data-framer-name="DemoButton"] with your actual button’s data attribute.
Track Page-Specific Events
Add custom code to individual pages:- Select the page in your Framer project
- Click Page Settings (gear icon)
- Go to Custom Code
- Add your tracking code in End of
<body>tag:
Track External Link Clicks
Track when users click links to external sites:Identify Users
If you collect email addresses or user IDs, identify users for cross-device tracking:Troubleshooting
Not seeing events? Check that:- Your tracking script is in Start of
<head>tag (not End of<body>) - You’ve published your site (tracking doesn’t work in editor preview)
- Your workspace ID is correct
- Ad blockers are disabled
- Your code is wrapped in
<script>tags - You’re testing on the published site, not the preview
- There are no JavaScript errors in the browser console (F12)
Next Steps
Verify Tracking
Confirm events are coming through
Track Custom Events
Learn event tracking API
Connect Integrations
Link Meta Ads, Google Ads, TikTok
View Your Dashboard
See your tracking data