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.
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.
Custom Tracking Code
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. Custom code is configured separately for each site.
Custom Head Code
Code entered here is injected into the <head> section of every page on the selected site. This is useful for:
- Additional tracking pixels that need to load early
- Meta tags required by other analytics platforms
- Third-party script tags
Custom Body Code
Code entered here is injected just before the closing </body> tag on every page on the selected site. This is useful for:
- Analytics scripts that should load after page content
- Conversion tracking snippets
- Chat widgets or other third-party tools
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 Custom Head Code or Custom Body Code 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.