Analytics & Tracking
Add analytics tracking to your community so you can measure visitor activity and campaign performance. Analytics are configured separately for each site:
- Community & Embedded Site — share the same analytics configuration
- Advocate Site — has its own separate analytics configuration
This lets you use different tracking IDs or custom code for public-facing pages versus the advocate dashboard.
Configuring any tracker automatically adds a cookie consent banner to that site, and trackers only load after the visitor consents. See How the Cookie Consent Banner Works below for why.
Accessing Analytics Settings
- Go to Settings in the navigation
- Click Analytics
You will see separate configuration sections for each site, plus a shared Storefront UTM Tracking section.
Google Analytics
Stoked supports Google Analytics 4 (GA4) as a first-class integration. When you provide a measurement ID, the GA4 tracking script is automatically added to every page of that site.
Setting Up Google Analytics
- Go to Settings > Analytics
- Under the site you want to configure (Community & Embedded Site or Advocate Site), enter your Google Analytics Measurement ID
- Click Save Settings
You can use the same measurement ID for both sites or different IDs if you want separate analytics properties.
Finding Your Measurement ID
Your GA4 measurement ID looks like G-XXXXXXXXXX. To find it:
- Sign in to Google Analytics
- Click Admin (gear icon)
- Under Data collection and modification, click Data Streams
- Select your web data stream
- Copy the Measurement ID shown at the top
For more details, see Google’s guide to finding your measurement ID.
It may take up to 24 hours for data to appear in your Google Analytics reports after adding your measurement ID.
Meta Pixel
Stoked supports the Meta Pixel as a first-class integration. When you provide a Pixel ID, the Meta Pixel tracking script is automatically added and fires a PageView event on each page load.
Setting Up Meta Pixel
- Go to Settings > Analytics
- Under the site you want to configure (Community & Embedded Site or Advocate Site), enter your Meta Pixel ID
- Click Save Settings
Finding Your Pixel ID
Your Meta Pixel ID is a numeric string like 123456789012345. To find it:
- Go to Meta Events Manager
- Click Data Sources in the left sidebar
- Select your Pixel
- Your Pixel ID is shown at the top of the page
For more details, see Meta’s guide to finding your Pixel ID.
How the Cookie Consent Banner Works
Privacy laws increasingly treat loading trackers before a visitor agrees as a legal liability, not just bad manners. The California Invasion of Privacy Act (CIPA) has fueled a wave of lawsuits against websites whose analytics pixels and chat widgets fired on first page load, and GDPR/ePrivacy rules in Europe have required prior consent for years. The trackers on your community site are your trackers — you configure them, and the data flows to your analytics accounts — so your brand carries that risk regardless of what domain the site runs on. Stoked handles the consent gating for you.
Here’s what Stoked does automatically:
- No trackers configured → no banner. Visitors see nothing extra.
- Any tracker configured → the banner appears for visitors who haven’t made a choice yet, with per-category toggles: Analytics (Google Analytics) and Marketing (Meta Pixel and tracking code).
- Nothing loads before consent. Google Analytics, Meta Pixel, and your tracking code only run after the visitor accepts that category. Declined categories never load.
- Visitors can change their mind anytime via the Cookie Preferences link in the site footer.
There is nothing to configure — the banner manages itself based on what you’ve set up on this page.
We’re not lawyers, and this isn’t legal advice. Stoked’s consent banner is designed to help you stay compliant, but privacy law varies by jurisdiction and changes often. You are responsible for your own compliance — including your privacy policy, any trackers you add via custom code, and anything you run outside of Stoked. When in doubt, talk to a privacy attorney.
Tracking Code (Consent-Gated)
If you use analytics providers beyond Google Analytics and Meta Pixel, you can add custom HTML or JavaScript code that is injected into your pages. Tracking code is configured separately for each site and only loads after the visitor accepts marketing cookies.
Tracking Head Code
Code entered here is injected into the <head> section after consent. This is useful for:
- Additional tracking pixels
- Tags required by other analytics platforms
Tracking Body Code
Code entered here is injected just before the closing </body> tag after consent. This is useful for:
- Analytics scripts that should load after page content
- Conversion tracking snippets
Essential Code (Always Loads)
Essential Head Code and Essential Body Code load on every page view, without consent gating. Use them only for things that don’t track visitors:
- Font loaders
- Meta or verification tags
- Non-tracking widgets
Do not put tracking scripts in the Essential fields. Doing so bypasses the consent banner and puts your brand at exactly the legal risk the banner exists to prevent. If a script identifies, profiles, or follows visitors, it belongs in the Tracking fields.
Adding Custom Code
- Go to Settings > Analytics
- Under the site you want to configure (Community & Embedded Site or Advocate Site), paste your code into the appropriate Tracking or Essential field
- Click Save Settings
Custom code is injected directly into your pages without sanitization. Only add code from trusted sources. Incorrect or malicious code can break your site’s functionality.
Storefront UTM Tracking
Stoked automatically adds UTM parameters to your storefront links so you can track how much traffic your Stoked community drives to your store. UTM settings are shared across all sites.
How It Works
When a visitor clicks a storefront link on your community site, Stoked appends UTM parameters to the URL. For example, if your storefront URL is https://www.example-store.com, the link becomes:
https://www.example-store.com?utm_source=stoked&utm_medium=referral&utm_campaign=community
These parameters appear in your store’s analytics (Google Analytics, Shopify Analytics, etc.) so you can see exactly how much traffic comes from your Stoked community.
Preserving Existing UTM Parameters
Stoked will not override existing UTM parameters. If your storefront URL already includes UTM parameters (for example, https://www.example-store.com?utm_source=newsletter), Stoked leaves the URL unchanged. This ensures your existing campaign tracking is never disrupted.
Customizing UTM Values
You can customize the UTM values that Stoked adds to your storefront links:
- Go to Settings > Analytics
- In the Storefront UTM Tracking section, update any of the three fields:
- UTM Source — Identifies where the traffic comes from (default:
stoked) - UTM Medium — Identifies the marketing medium (default:
referral) - UTM Campaign — Identifies the campaign name (default:
community)
- UTM Source — Identifies where the traffic comes from (default:
- Click Save Settings
UTM parameters are only added to storefront links that appear in your community site header (the Primary CTA links). The storefront Primary URL stored in your settings is not modified.