Analytics
Consent-aware Google Analytics and Google Tag Manager integration for Tavo.js applications.
npm install @tavojs/analyticsDeclares and explains its required analytics bootstrap permission.
View package →Tavo.js ecosystem
Plugins connect focused capabilities to Tavo.js application and build lifecycle. Start with official packages, then share what you build with the community.
Official plugins
First-party plugins are maintained alongside Tavo.js and designed to work with the framework's conventions and production tooling.
Consent-aware Google Analytics and Google Tag Manager integration for Tavo.js applications.
npm install @tavojs/analyticsDeclares and explains its required analytics bootstrap permission.
View package →Generate sitemap.xml and robots.txt from Tavo.js routes as part of the application build.
npm install @tavojs/sitemapDeclares its standard /sitemap.xml and optional /robots.txt exposure.
View package →Generate route-aware Schema.org JSON-LD for site identity, software applications, breadcrumbs, and custom schemas.
npm install @tavojs/structured-dataAdds JSON-LD script elements without a public route, network request, or unsafe permission.
View package →Configuration
Installing a trusted plugin enables the reviewed permissions and default public exposure declared in its manifest. These examples match the current package usage guides.
Choose one transport: Google Analytics or Google Tag Manager. In after-consent mode, grant consent before calling loadAnalytics(); pre-consent events are not replayed.
tsimport { createAnalyticsPlugin } from "@tavojs/analytics";
import { defineConfig } from "@tavojs/core/config";
const analytics = createAnalyticsPlugin({
googleAnalytics: { measurementId: "G-XXXXXXXXXX" }
});
export default defineConfig({
plugins: [analytics]
});Concrete pages are discovered automatically. Add explicit entries for dynamic routes. Static arrays can be emitted at build time; callbacks run per request unless emitStatic is enabled.
tsimport { createSitemapPlugin } from "@tavojs/sitemap";
import { defineConfig } from "@tavojs/core/config";
const sitemap = createSitemapPlugin({
siteUrl: "https://example.com",
robots: true,
entries: ["/products/featured"]
});
export default defineConfig({
plugins: [sitemap]
});Use the site helper for route-aware metadata and render it from the root layout head. Global plugin mode is intended only for a schema deliberately repeated on every SSR or prerendered page.
tsimport { Seo } from "@tavojs/core";
import type { PageLoadContext } from "@tavojs/core/router";
import { createStructuredDataSite } from "@tavojs/structured-data";
const structuredData = createStructuredDataSite({
siteUrl: "https://example.com",
website: { name: "Example" },
organization: { name: "Example Project" },
resolve({ pathname }) {
return pathname === "/docs"
? { breadcrumbs: [{ name: "Home", url: "/" }, { name: "Docs" }] }
: undefined;
}
});
export function head(context: PageLoadContext) {
const canonical = new URL(context.pathname, "https://example.com").href;
return (
<>
<Seo canonical={canonical} />
{structuredData.head(context)}
</>
);
}Community catalog
Tell us about your plugin. We will review its documentation, compatibility, maintenance, and security posture before adding it to the catalog.