How to install Attriboo on Docusaurus
Add Attriboo to the scripts array in docusaurus.config.js or docusaurus.config.ts. Docusaurus puts that entry in the head of your generated pages.
Instructions reviewed
Before you start
Find the Docusaurus configuration used by the published site. You need source access and permission to build and deploy the documentation website.
Add the published domain in Attriboo. Keep one tracking installation and preserve your site’s consent choices. Your website ID is public; private API keys do not belong in the page script.
Copy the script for this website
- Choose your website in Attriboo.
Check the address in the website selector. Add the website first if it is not listed.
- Open Setup and choose Docusaurus.
Under Add the tracking script to your website, find Where is your site built? Choose this platform, then use Copy beside Your code. This gives you the right code format with your website ID filled in.
Add Attriboo to Docusaurus
Find this setting
- Project root
- docusaurus.config.js or .ts
- scripts array
- Build and deploy
- Open the existing Docusaurus config object.
Find its scripts array or add one.
- Copy the Docusaurus entry from Setup into that array.
Preserve other scripts; keep src, defer and the quoted data-site-id property.
- Build and deploy the site.
Check a documentation page, another page reached through the sidebar, and browser Back.
// Add this object to the config's existing scripts array:
{
src: "https://www.attriboo.com/t.js",
defer: true,
"data-site-id": "site_YOUR_WEBSITE_ID"
}Check this platform’s behavior
Use the object form, not only a URL string: Attriboo needs its data-site-id attribute. Do not load the tracker in every MDX page or add a second pageview handler on each route change.
Check that page visits reach Attriboo
- Open the published website in another tab.
Use the address your customers visit. Make your normal tracking choice if a consent banner appears.
- Return to the same website in Attriboo → Setup.
Select Test Connection. Look for a successful result such as Verified Live or activity on the correct address.
- Follow an internal link, then use your browser’s Back button.
Check those paths in the Pages view for the current reporting dates. Allow the reports to refresh. An active connection alone does not confirm every page change.
Connect visits to recorded revenue
Installing the script records website activity. To bring sales into Attriboo, connect the service you use to collect payments in Setup as well. Then compare the recorded sources and customer journeys behind your sales.
A payment imported from before tracking was installed may have no matching visit. Installing today does not recreate old website activity.
Docusaurus references
These placement instructions were reviewed against the platform’s documentation and Attriboo’s current tracker. Check the published site after deployment, theme changes or navigation changes.
You are done when
The published Docusaurus site loads one Attriboo tracker and the expected page visits reach the selected website. Sales reporting is checked separately.
Still need a hand?
Send a question without needing to sign in.