What you need
Step 0: Concepts
- Environments and API Keys. Ensure product and marketing streams use the same environment key so data lands in the same workspace and correlation is possible. Read Environments and API Keys.
- Why Correlation Matters. Understand how shared
group_idjoins product usage with billing outcomes to unlock churn and expansion signals. Read Why Correlation Matters.
Step 1: Get your API key
Create or reuse your API key from the ThriveStack dashboard. You'll paste it into the script tag in the next step.
Step 2: Install the script
Choose the method that matches your marketing site's platform.
Create a Custom HTML tag
- In GTM, open your Web container and go to Tags → New
- Click Tag Configuration and choose Custom HTML
- Paste your ThriveStack script into the HTML field:
<script>
(function() {
var script = document.createElement('script');
script.src = 'https://cdn.app.thrivestack.ai/latest/script.js';
script.setAttribute('data-api-key', 'YOUR_API_KEY');
script.setAttribute('data-source', 'marketing');
script.async = true;
document.head.appendChild(script);
})();
</script> - Name the tag ThriveStack — Marketing Script
Set the trigger to All Pages
- In the Triggering section, click +
- Choose Page View → All Pages — fires the tag on every page where GTM is installed
- Click Save
Verify with GTM Preview
- Click Preview (top right) — Google Tag Assistant opens in a new tab
- Enter your site URL and click Connect
- Navigate a page and check the Tags panel — ThriveStack — Marketing Script should appear under Tags Fired
- Check your browser console for any script errors
Publish the container
- Click Submit → add a version name (e.g., Add ThriveStack script)
- Click Publish — the tag is now live on your site
Open Project Settings → Custom Code
- In the Webflow Designer, click the W icon (top-left) to open Project Settings
- Go to the Custom Code tab
Paste the script in the Head Code section
- Under Head Code, paste your ThriveStack script tag:
<script src="https://cdn.app.thrivestack.ai/latest/script.js"
data-api-key="YOUR_API_KEY" data-source="marketing"></script> - Click Save Changes
Head Code runs on every page of your site. Don't include <html> or <body> wrapper tags — only the script tag itself.
Publish your site
- Click Publish in the Designer toolbar — custom code is invisible in Designer preview and only runs on the published site
- You can publish to your staging domain first (e.g., yoursite.webflow.io) to test before going live
Verify the script is running
- Visit any published page and open browser DevTools (F12)
- In the Network tab, filter by thrivestack — you should see the script loaded
- Check the Console tab for any errors
Via WPCode plugin Recommended
- In WordPress admin, go to Plugins → Add New and install WPCode (formerly Insert Headers and Footers)
- Go to Code Snippets → Header & Footer
- Paste your ThriveStack script tag into the Header box:
<script src="https://cdn.app.thrivestack.ai/latest/script.js"
data-api-key="YOUR_API_KEY" data-source="marketing"></script> - Click Save Changes
The script loads on every page automatically and survives theme updates.
Via child theme's functions.php
- Make sure you're working in a child theme — changes to parent themes are lost on theme updates
- Open Appearance → Theme File Editor, select your child theme's
functions.php - Add the following at the bottom of the file:
function thrivestack_script() { echo '<script src="https://cdn.app.thrivestack.ai/latest/script.js" data-api-key="YOUR_API_KEY" data-source="marketing"></script>'; } add_action( 'wp_head', 'thrivestack_script', 999 );
- Click Update File
Find your shared layout file
The script must go in the <head> of every marketing page. Most frameworks have one shared file for this:
Add the script tag before </head>
data-api-key="YOUR_API_KEY" data-source="marketing"></script>
Replace YOUR_API_KEY with the key from your ThriveStack dashboard. Place this in the shared layout so it loads on every page.
Deploy your changes
Push and deploy as you normally would. The script only needs to be added once — it will load on every page that uses the shared layout.
Verify the script is loading
- Open any page of your live site and press F12 to open DevTools
- In the Network tab, filter by thrivestack — the script request should appear
- In the Elements tab, search for
thrivestackto confirm the tag is in<head> - Check the Console tab for any errors
Open Project Settings
In the Framer editor, open Project Settings.
Select the Custom Code tab
Select the Custom Code tab from the left sidebar.
Add a script
Click Add Script if you haven't added any code yet. Otherwise, click the + icon.
Name the script
Give the script a clear, recognizable name so you can identify it later — e.g., ThriveStack — Marketing Script.
Then paste your ThriveStack script tag into the code field:
data-api-key="YOUR_API_KEY" data-source="marketing"></script>
Replace YOUR_API_KEY with the key from your ThriveStack dashboard.
Choose where the code should be placed
Choose where the code should be placed on your site. Select Head so the script loads on every page.
Publish your site
Click Publish — custom code only runs on the published site, not in the editor preview.
Verify the script is running
- Visit any published page and open browser DevTools (F12)
- In the Network tab, filter by thrivestack — you should see the script loaded
- Check the Console tab for any errors
Official docs: How to add custom code — Framer Help
Step 3: Confirm data is arriving
Once your script is live, check that visitors are arriving in ThriveStack.
See whether ThriveStack is receiving visitors and page views from your marketing site — your ground truth for a working install.
Real-time stream of page view and visitor events. Useful right after deployment to confirm the tag is working across all pages.
What did you just achieve?
Traditional Marketing Analytics tools show you vanity metrics like Traffic, Page Visits, and Visitor Trends — most of that is free with Google Analytics. ThriveStack goes far beyond that. It gives you full-journey correlation by stitching together Marketing touchpoints, Product usage, Account behavior, and Billing events.
| Feature | Traditional Analytics | ThriveStack |
|---|---|---|
| Track pages | ||
| Track New Visitors | ||
| Traffic by UTM | ||
| Content Performance | ||
| Track Returning Visitors | ||
| Goal Conversions | ||
| Lead Quality | ||
| Multi-Touch Attribution | [P][R] | |
| Channel Performance (correlated with Product & Revenue) | [P][R] | |
| Time to Acquisition | [P] | |
| Touchpoints to Acquisition | [P] |
[P] and [R] mean Product and Revenue co-relation.
- Various Marketing Intelligence reports are now available.
- Out of box reports are set up — share with your Marketing, Product, and Sales teams.
- Account-level analytics including 40+ metrics across Activation, Feature Usage, and API Usage are available in the Full Journey CRM.
What's next?
Marketing Intelligence is one half of the picture. Set up Product Intelligence to start correlating marketing touchpoints with product usage, account behaviour, and revenue.
Set up Product Intelligence