Shipkit
DocsFeaturesPricing
DocsFeaturesPricing

Shipkit DocumentationBuild memory optimizationDevelopment GuideEnvironment VariablesError HandlingFile StructureMiddlewareRebranding Guide

Vercel Deployment Checks

Development GuideCLIDependency UpdatesDevToolsFeature FlagsAI PromptsSetup RequirementsSupply chaintRPCWeb Workers

FeaturesAIAnalytics IntegrationAuthenticationCMSDatabaseEmailHapticsPaymentsComponent RegistryStorageUIVisual BuilderWaitlist Feature

Quick StartDeploymentEnvironment VariablesFile StructureSetup Wizard

Caching & Rate LimitingContent ManagementError HandlingMarkdown and MDXMiddlewareProxy-Safe Server ActionsRebranding GuideWebhook Security Implementation GuideMulti-Zone ArchitectureVercel Deployment

IntegrationsPayload CMSDataFast Analytics IntegrationGoogle Analytics IntegrationGoogle Tag Manager IntegrationPostHogStatSig IntegrationUmami Analytics IntegrationAuth.js IntegrationBetter AuthClerkStack Auth IntegrationSupabase Authentication IntegrationBuilder.io IntegrationPayload CMS IntegrationAWS S3 IntegrationResend Email IntegrationUpstash Redis IntegrationVercel Blob IntegrationLemon SqueezyPolarStripe

API RoutesComponentsAPI Route SnippetsAuthentication SnippetsComponent SnippetsForm Handling SnippetsSnippets Introduction

    DataFast Analytics Integration

    DataFast is a privacy-friendly analytics tool with strong revenue attribution capabilities.

    Environment Variables

    # Required
    NEXT_PUBLIC_DATAFAST_WEBSITE_ID=your_website_id
    
    # Optional (used for improved reporting in their UI)
    NEXT_PUBLIC_DATAFAST_DOMAIN=yourdomain.com
    

    Notes:

    • You can set DATAFAST_WEBSITE_ID without the NEXT_PUBLIC_ prefix and Shipkit will automatically generate NEXT_PUBLIC_DATAFAST_WEBSITE_ID at build time (client accessible) via the public env mirroring.
    • The non-prefixed variable is not accessible on the client; only the generated NEXT_PUBLIC_* value is exposed.

    Setup Instructions

    1. Go to your DataFast dashboard and copy your Website ID.
    2. Add the env variable(s) listed above to your environment.
    3. Build and deploy. The tracking script is injected automatically when the feature flag is enabled.

    How It Works

    • At build time, Shipkit detects NEXT_PUBLIC_DATAFAST_WEBSITE_ID and sets the NEXT_PUBLIC_FEATURE_DATAFAST_ENABLED flag.
    • At runtime, DataFastAnalytics injects the recommended script:
    <Script
      src="https://datafa.st/js/script.js"
      data-website-id={env.NEXT_PUBLIC_DATAFAST_WEBSITE_ID}
      data-domain={env.NEXT_PUBLIC_DATAFAST_DOMAIN}
      strategy="afterInteractive"
    />
    

    Resources

    • DataFast App Router Guide: https://datafa.st/docs/nextjs-app-router