### Plausible Analytics Tracking Script Example Source: https://github.com/plausible/website/blob/master/_posts/2024-07-17-every-possible-way-to-ensure-your-web-analytics-is-working-correctly.md This is an example of the Plausible Analytics tracking script that should be included in your website's HTML. Ensure the 'data-domain' attribute is set to your specific domain for correct tracking. ```html ``` -------------------------------- ### CI/CD Pipeline for Jekyll Site Deployment Source: https://context7.com/plausible/website/llms.txt This GitHub Actions workflow automates the build and deployment of the Jekyll website. It checks out the code, sets up Node.js, installs npm dependencies, builds the Jekyll site, configures Tailscale for secure deployment, deploys the site using rsync, and purges the BunnyCDN cache. ```yaml name: Jekyll site CI on: push: branches: [ master ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Read .tool-versions uses: marocchino/tool-versions-action@v1 id: versions - uses: actions/setup-node@v3 with: node-version: ${{steps.versions.outputs.nodejs}} cache: 'npm' - run: npm install - name: Build uses: jerryjvl/jekyll-build-action@v1 - name: Tailscale uses: tailscale/github-action@v2 with: oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} version: '1.50.1' tags: tag:static-sites - name: Deploy to Static Sites Host uses: burnett01/rsync-deployments@6.0.0 with: switches: -avzr --delete path: _site/ remote_path: /var/www/website/ remote_host: ${{ secrets.DEPLOY_STATIC_SITE_HOST }} remote_user: ${{ secrets.DEPLOY_STATIC_SITE_USER }} remote_key: ${{ secrets.DEPLOY_STATIC_SITE_KEY }} - name: Purge BunnyCDN cache uses: eayllon/bunnycdn-purge-cache@253ab627f8e743b4d7f96e7020e8bc04377ac49d with: accessKey: ${{ secrets.BUNNY_API_KEY }} zoneID: ${{ secrets.BUNNY_ZONE_ID }} ``` -------------------------------- ### Example: Track 'Login Click' Custom Event in GTM Source: https://github.com/plausible/website/blob/master/_articles/how-to-set-up-plausible-analytics-using-google-tag-manager.md An example of a Custom HTML tag in GTM to track a specific custom event named 'Login Click' in Plausible. This tag would typically be paired with a trigger that identifies when a user clicks a login button. ```javascript window.plausible("Login Click"); ``` -------------------------------- ### Tagging Links with UTM Parameters (URL) Source: https://github.com/plausible/website/blob/master/_posts/2020-08-03-how-will-chromes-new-referrer-policy-affect-your-site-analytics.md This example shows how to append UTM parameters to a URL to ensure that traffic originating from this link is correctly attributed in analytics tools. Query parameters like `utm_source` are recognized by Plausible Analytics and other tools to identify referral sources, helping to reduce 'no referrer' traffic. ```url ?utm_source= ```