ImpressPages (IP) is an open-source CMS with a lightweight theming system. CookieScan can be added by editing your theme's main.php file or via a custom code plugin if one is installed.
Before you start
You will need:
- An active CookieScan subscription (view plans)
- Your banner installation code from the CookieScan dashboard (Cookie Banner → Install Code)
- Administrator access to your ImpressPages site
- FTP or file manager access to your server
The install code looks like this:
<script src="https://banner.cookiescan.com/js?id=YOUR-COOKIESCAN-ID"></script>
Replace YOUR-COOKIESCAN-ID with the code from your dashboard.
Method 1: Edit your theme's main.php (recommended)
Step 1 – Locate your theme
Via FTP or your file manager, navigate to:
/Theme/<your-active-theme>/main.php
To confirm which theme is active, check Admin → Design in the ImpressPages admin.
Step 2 – Edit main.php
- Open
main.phpin your code editor - Find the opening
<head>tag near the top - Add your CookieScan script immediately after
<head>:
<head>
<script src="https://banner.cookiescan.com/js?id=YOUR-COOKIESCAN-ID"></script>
<?php echo ipHead(); ?>
...rest of your head content...
</head>
Step 3 – Save and clear cache
- Save and upload the file back to your server
- In ImpressPages admin, go to Admin → Development → Dispatch Cache and clear cache
- Visit your site in a new incognito window
Tip: If you're using a theme you don't control (e.g. a purchased theme that gets updates), consider creating a child theme or copying the theme to a new folder so your changes aren't overwritten.
Method 2: Use ipHead() filter (for developers)
For a more portable approach, use ImpressPages's hook system in your plugin or theme's setup.php:
IpEvent::addListener('ipBeforeController', function () {
ipAddJs('https://banner.cookiescan.com/js?id=YOUR-COOKIESCAN-ID');
});
Or inject raw HTML into the head via:
ipAddHeadJs('https://banner.cookiescan.com/js?id=YOUR-COOKIESCAN-ID');
Method 3: Install via Google Tag Manager
If GTM is already on your ImpressPages site:
- In CookieScan, open Cookie Banner → Install Code and switch to the Google Tag Manager Install tab
- Copy your CookieScan ID
- In GTM, add the CookieScan template from the Community Gallery
- Create a tag using the template, paste your ID
- Trigger: Consent Initialization – All Pages
- Submit and publish
Verify the installation
- Visit your site in a new incognito window
- The CookieScan banner should appear
- Open DevTools (F12) → Network tab → filter by
cookiescan - Confirm
banner.cookiescan.comloads
What happens next
- CookieScan scans your site and detects all cookies
- New cookies appear in Cookie Manager → Unclassified – categorise them
- The banner blocks cookies until user consent
- Every decision is logged in Consent Log
Troubleshooting
Banner not appearing
- Clear ImpressPages cache: Admin → Development → Dispatch Cache
- View page source and confirm the script is in the
<head> - Check the file
main.phpwas uploaded correctly
Changes lost after theme update
- Create a copy of the theme in a new folder and activate that instead
- Or use Method 2 (plugin hook) which survives theme updates
Cookies still loading before consent
- ImpressPages plugins may set cookies server-side
- Run Cookie Manager → Rescan Domain in CookieScan to catalogue them
Full documentation
For detailed setup help, see the support guide linked in your CookieScan dashboard, or visit our support guides.