If you have access to the code of your website, installing the pixel means pasting one line in the header of your pages.
Before you start
- Have the campaign created with the right domain: Create your first campaign.
- Copy the code from Campaigns, option Install pixel, button Copy pixel code.
Steps
- Open the HTML file of your page in your code editor.
- Find the closing
</head>tag. - Paste the pixel code right before that tag.
- Save the file and upload it to your server.
The result looks like this:
<head>
<title>My website</title>
...
<!-- Pixel Code - https://notikit.com/ -->
<script defer src="https://notikit.com/pixel/YOUR_PIXEL_KEY"></script>
<!-- END Pixel Code -->
</head>
If your website has several pages
The pixel must be on every page where you want to show notifications or capture forms. The most practical way is to paste it in the file shared by all pages: the base template, the layout or the header file included by your website or framework. That way you install it only once.
If you cannot edit the head
The code uses the defer attribute, so it also works if you paste it before the closing </body> tag. What matters is that the code is present on the page exactly as you copied it, without changing the URL or the key.
Common mistakes
- Pasting the code of another campaign: each campaign has its own key and only works on its domain.
- Testing the website from
localhostor from a staging address that differs from the campaign domain: the pixel shows nothing if the domain does not match. - Pasting the code as visible text instead of as HTML.
When you are done, continue with Verify the pixel installation.