diff --git a/.github/workflows/create-pr.yaml b/.github/workflows/create-pr.yaml index 59c2c4a..cdcf307 100644 --- a/.github/workflows/create-pr.yaml +++ b/.github/workflows/create-pr.yaml @@ -16,7 +16,7 @@ jobs: git reset --hard develop - name: Create Pull Request id: cpr - uses: peter-evans/create-pull-request@v7.0.9 + uses: peter-evans/create-pull-request@v8.1.1 with: token: ${{ secrets.PR_TOKEN }} commit-message: Update main diff --git a/assets/js/custom.js b/assets/js/custom.js index edf5904..9187777 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -63,9 +63,9 @@ function addPostHogTag(apiKey, options = {}) { addPostHogTag('phc_VXNcrtI3vEl899qY4aKXoHcLxtt08qxMnWHLfnLjPCf'); -/** * Function to add Google Analytics tag dynamically +/** + * Function to add Google Analytics tag dynamically */ - function addGoogleAnalyticsTag(trackingId) { // Load the gtag.js script asynchronously const script = document.createElement('script'); @@ -87,6 +87,24 @@ function addGoogleAnalyticsTag(trackingId) { // Call the function with your tracking ID addGoogleAnalyticsTag('G-81E77KGMGF'); +/** + * Function to add Cloudflare Web Analytics tag dynamically + */ +function addCloudflareAnalyticsTag(token) { + if (!token || typeof document === 'undefined') return; + + // Avoid injecting the same script multiple times. + if (document.querySelector('script[data-cf-beacon]')) return; + + const script = document.createElement('script'); + script.defer = true; + script.src = 'https://static.cloudflareinsights.com/beacon.min.js'; + script.setAttribute('data-cf-beacon', JSON.stringify({ token })); + document.head.appendChild(script); +} + +addCloudflareAnalyticsTag('81f78840732445d79901d42f93257926'); + /** * Enhanced Cookie Consent Manager diff --git a/requirements.txt b/requirements.txt index c2e15f9..10e8b72 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,8 +6,8 @@ identify==2.6.18 jsmin==3.0.1 libsass==0.23.0 nodeenv==1.10.0 -platformdirs==4.9.4 +platformdirs==4.9.6 pre_commit==4.5.1 PyYAML==6.0.3 rcssmin==1.2.2 -virtualenv==21.2.0 +virtualenv==21.2.1