Google Ads Setup
Get campaign, ad group, and keyword data flowing into SpendRaven.
1. Install the tracker
Add this to every page that receives ad traffic, before the closing </head> tag:
<script defer src="https://cdn.spendraven.com/r.js"></script> 4KB, loads async, zero impact on page speed.
2. Set your tracking template
In Google Ads, go to Settings > Account Settings > Tracking. Paste this as your tracking template:
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={_campaign}&utm_term={keyword}&utm_content={creative}&sr_adgroup={adgroupid}&sr_network={network}&sr_matchtype={matchtype}&sr_device={device} Set at account level so it applies to all campaigns. Campaign-level overrides if needed.
3. Set the custom parameter
The template uses {_campaign} which requires a custom parameter. For each campaign:
- Open the campaign in Google Ads
- Go to Settings > Additional settings > Campaign URL options
- Under Custom parameters, add:
_campaign = your-campaign-name
Use a short, readable name (e.g., brand-search, competitor-terms).
4. What gets captured
| Parameter | Source | Example |
|---|---|---|
| Campaign | {_campaign} | brand-search |
| Keyword | {keyword} | life path calculator |
| Ad Group ID | {adgroupid} | 12345678 |
| Network | {network} | g (Search), s (Partners), d (Display) |
| Match Type | {matchtype} | e (exact), p (phrase), b (broad) |
| Device | {device} | m (mobile), c (desktop), t (tablet) |
| Click ID | gclid | Auto-appended by Google |
5. Verify it's working
- Click one of your ads (or use the ad preview tool)
- Check that the landing page URL contains the UTM parameters
- In SpendRaven, go to Settings > Tracking — status updates within minutes
Common issues
Keyword shows as "keyword"
Your tracking template has a literal keyword instead of {keyword}. The curly braces are required.
No data appearing
Check that the tracker script loads (DevTools > Network > filter "r.js") and that your landing page domain matches what's registered in SpendRaven.
Search Partners traffic
The sr_network parameter distinguishes Google Search (g) from Search Partners (s) and Display (d). Use this to identify low-quality traffic sources.