Install the tracking script
Create a script in your project and add it to your site. It takes a few minutes, and page views start arriving right away.
Clakta records the visits to your site through a script: a small piece of code you create in your project and add to your pages. A project can have several, for example one per site.
On Shopify you don't paste anything: the Clakta app adds the script for you. See Connect Shopify. On WooCommerce, follow Connect WooCommerce, which shows how to add it without code.
1. Create the script
Go to Project settings → Script and click Create script.
Name
Any name that helps you tell your scripts apart later, such as Main site.
Domains
The sites allowed to send data with this script. Add each one without
https://:
Data from any other site is rejected, so a copy of your site can't mix fake data into yours.
Leave the list empty to accept any site. That is handy while you test, but fill it in before you rely on the numbers.
Events recorded automatically
Choose what the script records on its own:
| Event | What it records |
|---|---|
| Page views | Every page a visitor opens. |
| Outbound clicks | Clicks on links to other websites. |
| Scrolls | How far visitors scroll down a page. |
| Form submissions | Forms sent on your pages. |
Keep Page views on: attribution depends on it. You can turn the others on or off at any time.
2. Add it to your site
Save the script and click Install instructions on its row. The code there already has your script id filled in.
Paste the code
Copy the code and paste it inside the <head> of every page of your site:
data-auto-init starts recording as soon as the page loads. Remove it only if
you want to start recording yourself, for example after the visitor accepts a
consent banner, by calling clakta.init({ id: "YOUR_SCRIPT_ID" }).
Next.js
Install the SDK:
Then add the provider once, in your root layout:
Pass the id directly. The provider starts only once per page, so a value that arrives later is ignored.
React or plain JavaScript
Install the package:
While setting up, add debug: true to see what the script is doing in the
browser console. For consent banners, see
Consent management.
3. Check that it loads
In the install instructions, click Test your website and type one of your domains. Clakta opens the page and looks for the script. A green result means the script is on that site.
This only proves the script is there. To check that data is arriving, go to Verify your setup.
Common mistakes
Next step
Related articles
What is Clakta?
Clakta shows which of your ads actually bring in sales, by connecting what you spend on ads to the orders you really received.
Create your team
Your team holds your plan, members, API keys and projects. You create it the first time you sign in.
Create your first project
A project is one business, with its own site, currency, ad accounts and data. Here is what each field does and which ones are hard to change later.