Back to Home

Installation

One-Line Setup

Add script tag. Done. Start tracking in 30 seconds.

No GTM Required
01

Get your API key

Create a free account to get your unique API key. This identifies your website in our system.

02

Add the tracking script

Choose your framework and copy the snippet:

html
<!-- Add before closing </body> -->
<script 
  src="https://www.sourcetrace.xyz/t.js" 
  data-site="YOUR_SITE_ID|YOUR_API_KEY"
  async>
</script>

Replace your-api-key with your actual API key from step 1.

03

Verify installation

Visit your website

Open browser console (F12)

Type ST.sessionId() — should return a UUID

Check your dashboard — pageview appears within seconds

Automatic tracking

What gets captured

Page viewsURL, title, referrer
Scroll depth25%, 50%, 75%, 100% milestones
Time on pageDuration before exit
ClicksLinks, buttons, CTAs
Rage clicksFrustration detection
AI referralsChatGPT, Claude, Perplexity, Gemini
UTM parameterssource, medium, campaign
Form submissionsWith UTM field injection

Advanced

Custom tracking

javascript
// Track custom events
ST.track('video_played', { id: '123' });

// Track conversions
ST.convert('signup', 99.00);

// SPA navigation
ST.page();

Ready to see your AI traffic?