1

we have implemented Posthog with React and tested the implementation, which is working fine on Chrome and Firefox. But when we are testing it on Brave/Microsoft Edge Browsers it is not working.

We have done some research on this, which says these browsers have default ad blocker feature enabled and I need to manually disable ad blocking.

For resolving Brave browser tracking issue, we have created self hosted cloud front distribution and pass cloud front url in api_host parameter inside posthog.init function but it's not working and I am getting authentication issue. Could you please guide me for the same ?

I have used posthog-js in my react app for tracking events. Everything is working properly on chrome browser but my custom events are not getting triggered on brave browser.

Here is console logs error, please have a look to attached screenshot

  • 1
    Hey , (an engineer from PostHog here) did you follow these instructions? https://posthog.com/docs/integrate/proxy Can you add the errors you're seeing to your question? – Paul D'Ambra Nov 11 '22 at 13:35
  • hello @PaulD'Ambra, I tried with cloud front distribution and pass cloud front url in api_host parameter inside posthog.init function but it's not working and I am getting authentication issue. – Vaibhav Gurnani Nov 14 '22 at 05:28
  • Hey, can you update the question with the details I asked for? It's not really possible to suggest what might be wrong otherwise – Paul D'Ambra Nov 14 '22 at 16:07
  • Hi @PaulD'Ambra, I have added screenshot of console errors on main question. please have a look – Vaibhav Gurnani Nov 15 '22 at 05:49

1 Answers1

1

The errors in the screenshot are the Brave browser doing its thing and blocking third-party scripts. You can check this using "shields" https://support.brave.com/hc/en-us/articles/360022806212-How-do-I-use-Shields-while-browsing-

I'd recommend you set up a reverse proxy so that traffic to PostHog travels to your own domain. So you would have something like https://my-own-domain.com/e

see https://posthog.com/docs/integrate/proxy

(as in the comment thread above. full disclosure I'm an engineer at PostHog)

Paul D'Ambra
  • 7,629
  • 3
  • 51
  • 96