AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

cloudflare-deploy

Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.

Original source
openai
License
Apache-2.0
Pinned revision
49f948faa9258a0c61caceaf225e179651397431

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read openai--cloudflare-deploy at revision 49f948faa9258a0c61caceaf225e179651397431, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 309

references/web-analytics/integration.md

Framework Integration

Web Analytics is dashboard-only - no programmatic API. This covers beacon integration.

Basic HTML

<script defer src='https://static.cloudflareinsights.com/beacon.min.js' 
        data-cf-beacon='{"token": "YOUR_TOKEN", "spa": true}'></script>

Place before closing </body> tag.

Framework Examples

| Framework | Location | Notes | |-----------|----------|-------| | React/Vite | public/index.html | Add spa: true | | Next.js App Router | app/layout.tsx | Use <Script strategy="afterInteractive"> | | Next.js Pages | pages/_document.tsx | Use <Script> | | Nuxt 3 | app.vue with useHead() | Or use plugin | | Vue 3/Vite | index.html | Add spa: true | | Gatsby | gatsby-browser.js | onClientEntry hook | | SvelteKit | src/app.html | Before </body> | | Astro | Layout component | Before </body> | | Angular | src/index.html | Add spa: true | | Docusaurus | docusaurus.config.js | In scripts array |

Configuration

{
  "token": "YOUR_TOKEN",
  "spa": true
}

Use spa: true for: React Router, Vue Router, Next.js, Nuxt, Gatsby, SvelteKit, Angular

Use spa: false for: Traditional server-rendered (PHP, Django, Rails, WordPress)

CSP Headers

script-src 'self' https://static.cloudflareinsights.com;
connect-src 'self' https://cloudflareinsights.com;

GDPR Consent

// Load conditionally based on consent
if (localStorage.getItem('analytics-consent') === 'true') {
  const script = document.createElement('script');
  script.src = 'https://static.cloudflareinsights.com/beacon.min.js';
  script.defer = true;
  script.setAttribute('data-cf-beacon', '{"token": "YOUR_TOKEN", "spa": true}');
  document.body.appendChild(script);
}