How to get _fbp and _fbc while Installing Meta Pixel?

I am trying to install Meta Pixel on my website.

According to facebook, the _fbp and _fbc are stored under browser cookies.

My approach is this:

const cookieParser = require('cookie-parser'); const fbp = req.cookies['_fbp']; const fbc = req.cookies['_fbc']; 

and pass these values to Facebook API?

Is this the correct approach?

1

Related questions 4807 How do I get a timestamp in JavaScript? 2122 How can I update Node.js and NPM to their latest versions? 1567 How to get GET (query string) variables in Express.js on Node.js? Related questions 4807 How do I get a timestamp in JavaScript? 2122 How can I update Node.js and NPM to their latest versions? 1567 How to get GET (query string) variables in Express.js on Node.js? 2996 How do I get the current date in JavaScript? 2694 How can I get query string values in JavaScript? 2410 How to get the children of the $(this) selector? 2433 Get the size of the screen, current web page and browser window 1736 How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X) 1558 What is the purpose of Node.js module.exports and how do you use it? Load 6 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.