From dea847c3b33d2ce9bbe8668279c698b990b03b65 Mon Sep 17 00:00:00 2001 From: piotr-roslaniec <39299780+piotr-roslaniec@users.noreply.github.com> Date: Wed, 11 Jun 2025 06:09:47 +0200 Subject: [PATCH 1/7] Update CODEOWNERS --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index f50e7f0..8b9a19b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -.github/workflows/ci.yaml @pdyraga @lukasz-zimnoch @cygnusv +.github/workflows/ci.yaml @pdyraga @lukasz-zimnoch @cygnusv @piotr-roslaniec From 9001c6ad9da2a6780c4877c31829181e09adacb9 Mon Sep 17 00:00:00 2001 From: Piotr Roslaniec Date: Mon, 23 Jun 2025 13:22:50 +0200 Subject: [PATCH 2/7] chore: add cookie3 script --- .env.example | 3 ++- .github/workflows/ci.yml | 2 ++ gatsby-ssr.tsx | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index d151627..6513e08 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,3 @@ GATSBY_GTM_ID=GTM-XXXXXXX -GATSBY_GTM_SUPPORT=false \ No newline at end of file +GATSBY_GTM_SUPPORT=false +GATSBY_COOKIE3_SITE_ID=XXXXXXXXXXXXXXXX \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9b85b8..c326c7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ jobs: env: PUBLIC_URL: /${{ github.head_ref }} GATSBY_SUBGRAPH_API_KEY: ${{ secrets.SUBGRAPH_API_KEY }} + GATSBY_COOKIE3_SITE_ID: ${{ secrets.COOKIE3_SITE_ID }} - name: Build if: github.event_name == 'push' @@ -48,6 +49,7 @@ jobs: GATSBY_GTM_SUPPORT: true GATSBY_GTM_ID: ${{ secrets.GTM_ID }} GATSBY_SUBGRAPH_API_KEY: ${{ secrets.SUBGRAPH_API_KEY }} + GATSBY_COOKIE3_SITE_ID: ${{ secrets.COOKIE3_SITE_ID }} - uses: actions/upload-artifact@v4 with: diff --git a/gatsby-ssr.tsx b/gatsby-ssr.tsx index 09706d0..a945e22 100644 --- a/gatsby-ssr.tsx +++ b/gatsby-ssr.tsx @@ -1 +1,23 @@ +import React from "react" +import type { GatsbySSR } from "gatsby" + +const COOKIE3_SCRIPT_VERSION = "0.11.24" + +export const onRenderBody: GatsbySSR["onRenderBody"] = ({ + setHeadComponents, +}) => { + if (process.env.GATSBY_COOKIE3_SITE_ID) { + setHeadComponents([ +