If your website already has Google Tag Manager (GTM) installed, you can load the Notikit pixel from there, without editing the code of the site.
Before you start
- The GTM container must be installed and published on your website.
- Create the campaign with the domain of your website: Create your first campaign.
- Copy the code from Campaigns, option Install pixel.
Steps
- Open your Google Tag Manager container.
- Create a new tag.
- As the tag type, choose Custom HTML.
- Paste the Notikit pixel code in the HTML field.
- As the trigger, choose the one that fires on all pages.
- Name the tag, for example
Notikit - Pixel, and save it. - Use the GTM preview to check that the tag fires on your website.
- Submit and publish the container changes. Until you publish, the tag does not reach your visitors.
Limiting the load to some pages
You do not need different GTM triggers to decide where each notification is seen. The simplest approach is to load the pixel on all pages and define in Notikit where each one appears, from the Triggers tab. See Triggers: where and when it appears.
Keep in mind
- Cookie consent. If your container blocks tags until the visitor accepts cookies, the pixel only loads after that acceptance.
- Blockers. Some ad blockers prevent GTM from loading. Those visitors receive no tags at all, including the pixel.
- Do not duplicate it. If you already pasted the pixel directly in the code of the site, do not load it through GTM as well.
- One tag per campaign. Each campaign has its own key. If you manage several websites with different containers, use the code of the matching campaign in each one.
To confirm the pixel is working, continue with Verify the pixel installation.