Open uriklar opened 4 years ago
Can you expand on "it triggers on every route change"?
In gatsby-browser.js the ViewContent event is being made to fire onRouteUpdate.
This means it's firing on every page change - some of which are irrelevant.
I'm about to work on this now - the plan is it needs to check the route to only fire if it's a PDP url
exports.onRouteUpdate = function () {
// Don't track while developing.
if (process.env.NODE_ENV === `production` && typeof fbq === `function`) {
fbq("track", "ViewContent");
}
};
From the facebook pixel spec ViewContent is defined as:
The fact that it triggers on every route change makes it pretty much equal the PageView events. Do you think this is the desired behaviour? Thanks!