I'm wondering How can I do to use snapchat pixel on a next.js is it the same way as add facebook pixel?
To integrate snapchat pixel,
you could either follow the official documentation and copy paste the generated code within your app directly (using next/head
).
An alternate way would be to use the package next-snapchat-pixel.
# install the package
npm i next-snapchat-pixel
Then use it like this
import SnapPixel from 'next-snapchat-pixel';
SnapPixel.init('YOUR_PIXEL_ID');
SnapPixel.track('TRACK_TYPE');
// For tracking with data (price,currency,...)
SnapPixel.trackWithData('TRACK_TYPE', {DATA})