Skip to content

Commit

Permalink
➕ Integrate Poptin (#2011)
Browse files Browse the repository at this point in the history
* ➕Integrate Poptin

* 🔧 Update CSP config for stylesheet

* ⚡️ Preload Poptin script
  • Loading branch information
nwingt authored Jan 14, 2025
1 parent 9a51939 commit c6005e8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ const nuxtConfig = {
href: 'https://js.stripe.com/v3',
as: 'script',
},
{
hid: 'pixel-script-poptin-link',
rel: 'preload',
href: 'https://cdn.popt.in/pixel.js?id=771c46b9e377e',
as: 'script',
},
{
rel: 'icon',
type: 'image/png',
Expand Down Expand Up @@ -147,6 +153,11 @@ const nuxtConfig = {
src: 'https://js.stripe.com/v3',
async: true,
},
{
hid: 'pixel-script-poptin',
src: 'https://cdn.popt.in/pixel.js?id=771c46b9e377e',
async: true,
},
{
hid: 'schema',
innerHTML: JSON.stringify([
Expand Down Expand Up @@ -256,12 +267,14 @@ const nuxtConfig = {

// cloudflare
'static.cloudflareinsights.com',
'cdnjs.cloudflare.com',

'https://unpkg.com/@google/[email protected]/',
'https://substackapi.com',
'*.crisp.chat',
'connect.facebook.net',
'*.elfsight.com',
'cdn.popt.in',
],
'frame-src': [
'blob:',
Expand Down Expand Up @@ -306,6 +319,11 @@ const nuxtConfig = {
"'unsafe-inline'",
'client.crisp.chat',
'fonts.googleapis.com',

// Poptin
'fonts.popt.in',
'cdn.popt.in',
'cdnjs.cloudflare.com',
],
'worker-src': ["'self'", 'blob:'],
'child-src': ["'self'", 'blob:'],
Expand Down

0 comments on commit c6005e8

Please sign in to comment.