http://localhost:9000/?utm_source=facebook&utm_medium=advertising&utm_campaign=jobpost
or
http://localhost:9000/test/?utm_source=facebook&utm_medium=advertising&utm_campaign=jobpost
or
http://localhost:9000/blah/?utm_source=facebook&utm_medium=advertising&utm_campaign=jobpost
How to get and check whether utm_source
is in URL or not in NodeJS/Express? I've tried like that but not successful.
app.get('/*', function(req, res){
if (req.query.utm_source === 'facebook') {
res.send('1) id: ' + req.query.utm_source);
} else {
res.redirect('/blah');
}
});