Add DataFast to your Replit project
Replit supports various frameworks and includes an AI assistant to help modify your code. You can use Replit Agent to integrate DataFast analytics into your web application.
Step 1: Locate your DataFast credentials
Access your DataFast website settings and copy your Website ID (e.g., "66d5561aa2f1fb254ce42d0b") and domain name (e.g., "yourdomain.com").
Your tracking script contains this information:
<script
defer
data-website-id="YOUR_WEBSITE_ID"
data-domain="YOUR_DOMAIN.COM"
src="https://datafa.st/js/script.js"
></script>
Step 2: Ask Replit Agent to add tracking
Open Replit Agent (AI assistant) and use this customized prompt:
Help me integrate DataFast analytics into my web project. I need this tracking script added to work across my entire application: <script defer data-website-id="⚠️>>> REPLACE WITH YOUR WEBSITE ID <<<⚠️" data-domain="⚠️>>> REPLACE WITH YOUR DOMAIN <<<⚠️" src="https://datafa.st/js/script.js" ></script> Implementation based on my project type: - HTML/CSS/JS projects: Add to the <head> section of index.html and all pages - React projects: Use proper Script component in the main layout - Next.js projects: Add Script component to _app.js or layout - Express/Node.js: Include in your template engine or static HTML files - Python Flask/Django: Add to base template head section Requirements: - Script must load on every page/route - Preserve the defer attribute - Use the exact source URL: https://datafa.st/js/script.js Please implement this and show me exactly what changes you made to which files.
Step 3: Test your implementation
After Replit Agent makes the changes:
- Run your project - Use Replit's run button to start your application
- Open the preview - View your app in Replit's webview or open the public URL
- Check analytics - Monitor your DataFast dashboard for visitor data
Troubleshooting with Replit Agent
If tracking isn't working:
The DataFast analytics doesn't seem to be working. Can you help debug this? Please verify: 1. What type of project am I running? (React, HTML, Next.js, etc.) 2. Which files did you modify to add the analytics? 3. Is the script loading in the browser's developer tools? 4. Will it track visitors on all pages of my site? The analytics should connect to: https://datafa.st/js/script.js With my website ID: ⚠️>>> REPLACE WITH YOUR WEBSITE ID <<<⚠️ Please fix any implementation issues you find.
Common issues:
- Script only added to one page instead of globally
- Wrong file modified for the project framework
- Analytics not working in Replit's development preview
- Project not publicly accessible for testing
Need help?
If you're having trouble with your Replit setup, contact us at marc@datafa.st.