Add DataFast to your Lovable website
Lovable is an AI website builder that creates websites through prompts. Since you don't write code directly, you'll need to ask Lovable's AI to add the DataFast tracking script for you.
Step 1: Get your DataFast details
Before prompting Lovable, go to your DataFast website settings and copy your Website ID (e.g., "66d5561aa2f1fb254ce42d0b") and domain name (e.g., "yourdomain.com").
All the information you need is in your DataFast tracking script. It should look like this:
<script
defer
data-website-id="YOUR_WEBSITE_ID"
data-domain="YOUR_DOMAIN.COM"
src="https://datafa.st/js/script.js"
></script>
Step 2: Copy and customize this prompt into Lovable's chat
Copy the prompt template below, replace the two placeholders with your actual Website ID and domain, then paste the customized prompt into Lovable's chat:
Please add DataFast analytics tracking to my website. I need this script to load on every page of the website. **If using raw HTML:** Add this script tag to the <head> section of every page: <script defer data-website-id="⚠️>>> REPLACE WITH YOUR WEBSITE ID <<<⚠️" data-domain="⚠️>>> REPLACE WITH YOUR DOMAIN <<<⚠️" src="https://datafa.st/js/script.js" ></script> **If using React, Next.js, or similar frameworks:** Add the appropriate script component to load on every page. For example: - Next.js: Use the Script component from 'next/script' in the root layout - React: Add the script to the index.html or use useEffect to load it dynamically - Vite: Add to the index.html in the public folder Please use the method that's appropriate for the framework you're building my website with, and confirm what approach you used and that the tracking will work on all pages.
Step 3: Verify installation
After Lovable confirms the implementation:
- Publish your website - Use Lovable's publish feature (top right corner)
- Visit your live site - Once published, visit your actual website
- Check your dashboard - Go to your DataFast dashboard and look for incoming data (may take a few minutes)
Troubleshooting
If analytics data isn't appearing:
Ask Lovable to double-check:
Can you please verify that the DataFast tracking script is properly installed and will load on all pages? Please confirm: 1. What framework are you using for my website? 2. How did you implement the DataFast tracking? 3. Can you show me where you added the script? 4. Will it load on every page, including future pages I create? The tracking should load this script: https://datafa.st/js/script.js With my website ID: ⚠️>>> REPLACE WITH YOUR WEBSITE ID <<<⚠️ and domain: ⚠️>>> REPLACE WITH YOUR DOMAIN <<<⚠️ If something looks wrong, please fix it using the correct method for the framework you're using.
Common issues:
- Script only added to homepage instead of all pages
- Missing or incorrect Website ID or domain
- Script not implemented correctly for the framework being used
- Framework-specific components not used (e.g., using raw HTML in React instead of proper components)
- Lovable hasn't published the website yet
Need help?
If you're still having trouble, contact us at marc@datafa.st and we'll help you get set up.