3οΈβ£Installation guide
Here are the guides that walk you through installing the Cookie3 Analytics snippet in your tech stack
Accessing the Tracking Snippet
When adding a new site to your Cookie Analytics account, the tracking snippet will be displayed automatically.
For websites already added to your account, follow these steps to retrieve the snippet:
Log in to your Cookie3 Analytics account.
Click on the βManage websitesβ button in the applicationβs sidebar.
Click on the "Install" or "Manage" button in the table row corresponding with your website
Whatβs inside the tracking snippet?
The current version of the script should look like this:
The tracking snippet contains several important attributes:
src
: The URL of the Cookie3 Analytics script. Should be set to thecdn.markfi.xyz
hostnameintegrity
: A hash that ensures the script's integrity. Read more about our Security measures here βcrossOrigin
: Set to "anonymous" for CORS requestssite-id
: Your unique site identifier that you can copy within the app
Installation guides
Add The Tracking Snippet To Your Siteβs <head>
To integrate your website with Cookie3 Analytics, you need to insert the Cookie3 tracking snippet into the header section of your site.
Place the snippet within the <head> ... </head> tags on your websiteβs pages.
Next.js
For Next.js applications, you can add the Cookie3 tracking snippet to your pages by following these steps:
Access your
layout.tsx
or_app.tsx
in your projectβs repositoryAdd the following code to the file:
Replace
current-script-version
andyour-site-id
with the appropriate values from your Cookie3 Analytics account.
Nuxt
For Nuxt applications, you can add the Cookie3 tracking snippet by following these steps:
Create a new file called
cookie3-analytics.client.js
in yourplugins
directoryAdd the following code to the file:
Replace
current-script-version
andyour-site-id
with the appropriate values from your Cookie3 Analytics account.
Wordpress
For WordPress websites, you can add the Cookie3 tracking snippet by following these steps:
Log in to your WordPress admin panel
Navigate to Appearance > Theme Editor
Select your active theme and locate the header.php file
Add the Cookie3 tracking snippet just before the closing </head> tag in the header.php file
Save the changes and refresh your WordPress site
Remember to replace the <current-script-version> and <your-site-id> placeholders with the appropriate values from your Cookie3 Analytics account.
Framer
For Framer websites, you can add the Cookie3 tracking snippet by following these steps:
Open your Framer project and navigate to the Settings panel
Click on the "Custom Code" tab
Paste the Cookie3 tracking snippet into the "Head" section
Webflow
For Webflow websites, you can add the Cookie3 tracking snippet by following these steps:
Log in to your Webflow account and open your project
Navigate to the project settings and select the "Custom Code" tab
Paste the Cookie3 tracking snippet into the "Head Code" section
Last updated