Even though Hakanai Pulse is privacy-focused analytics, it may still be blocked by certain ad blockers. This guide explains why this happens and how to prevent it.
Ad blockers often use aggressive blocklists that target:
The most reliable solution is to proxy requests through your own domain. Instead of loading the script directly from Hakanai, you serve it from your domain.
Add this to your Nginx configuration:
location /pulse.js {
proxy_pass https://tracker.hakanai.io/hakanai.min.js;
proxy_set_header Host tracker.hakanai.io;
proxy_ssl_server_name on;
}
Add this to your .htaccess file:
RewriteEngine On
RewriteRule ^pulse\.js$ https://tracker.hakanai.io/hakanai.min.js [P]
Add this to your next.config.js:
module.exports = {
async rewrites() {
return [
{
source: '/pulse.js',
destination: 'https://tracker.hakanai.io/hakanai.min.js',
},
]
},
}
For Nuxt 3, add this to your nuxt.config.ts:
export default defineNuxtConfig({
nitro: {
routeRules: {
'/pulse.js': {
proxy: 'https://tracker.hakanai.io/hakanai.min.js'
},
}
}
})
script.js or website.js instead of analytics.js