Forum Posts Triggering Facebook Pixel Twice

Hey, I integrated my Facebook Pixel with my forum. Everything is working as expected, except that a PageView Pixel event triggers twice when I load forum post pages. A single PageView Pixel event is triggered on other forum pages. Does anybody know why this double-fire might be happening?

How did you add the pixel?

1 Like

I created a component (Settings > Customize > Components) called “Facebook Pixel” and then clicked “Edit CSS/HTML”. Then, I copied and pasted my Meta Pixel Code into the Common Head section and clicked “Save”. I tried moving the pixel to the Body section to see if that would fix the issue but it didn’t.

Any help you can provide is appreciated. Thanks!

Edit: I figured out why this was happening but I don’t know how to fix it. The URL changes after the page loads. For example, there’s a /3 appended to the end of the URL in the first PageView and a /2 appended to the second PageView. When I scroll up the page, the appendage disappears, which actually triggers a third PageView. Also, when I scroll back down, the appendage reappears.

1 Like

Hi Charles,
I briefly looked into this one and here’s a link that describes how to achieve the correct behaviour using SPAs (Discourse being one). I think you need to hook into the Ember routing system and track the PageView only when a new topic is opened.

I think you can post this is #marketplace and someone should be able to help out if you’re willing to spend some money on this.

6 Likes