diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 579c4fc0d48..4046cef2756 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -318,8 +318,21 @@ jobs: E2E_PG_ADMIN_URL: 'postgresql://postgres:postgres@127.0.0.1:5432/postgres' run: bun run test:e2e - - name: Upload E2E diagnostics + - name: Check E2E diagnostics eligibility + id: e2e_diagnostics if: failure() + shell: bash + run: | + shopt -s nullglob + markers=(apps/sim/e2e/.runs/*/markers/leak-scan-complete.json) + if (( ${#markers[@]} > 0 )); then + echo "safe=true" >> "$GITHUB_OUTPUT" + else + echo "safe=false" >> "$GITHUB_OUTPUT" + fi + + - name: Upload E2E diagnostics + if: failure() && steps.e2e_diagnostics.outputs.safe == 'true' uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: settings-e2e-${{ github.run_id }} diff --git a/apps/sim/app/(landing)/layout.tsx b/apps/sim/app/(landing)/layout.tsx index 9fef6524507..f9c31e12780 100644 --- a/apps/sim/app/(landing)/layout.tsx +++ b/apps/sim/app/(landing)/layout.tsx @@ -11,6 +11,7 @@ import { XPageViewTracker } from '@/app/(landing)/x-page-view-tracker' const HUBSPOT_SCRIPT_SRC = 'https://js-na2.hs-scripts.com/246720681.js' as const const X_PIXEL_ID = 'q5xbl' as const +const isMarketingAnalyticsEnabled = isHosted && !process.env.E2E_PROFILE /** X (Twitter) conversion tracking base code — loads uwt.js and fires the initial PageView. */ const X_PIXEL_BASE_CODE = `!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments); @@ -43,7 +44,7 @@ export default function LandingLayout({ children }: { children: ReactNode }) { {children} {/* HubSpot + X pixel tracking — hosted only */} - {isHosted && ( + {isMarketingAnalyticsEnabled && ( <>