Skip to main content

We are using Amplitude via segment events, in device mode. We integrated segment to our front end we pages, and write with JavaScript and angular.

It seems that ad blockers are sometimes blocking xhr requests to api.amplitude.com. 

We see that amplitude.js bundle is downloaded, but it fails to send events to amplitude backend.

We want to create proxy server for Amplitude, but we do not know how to configure the client side, as we have access to only analytics segment JS object, and not to amplitude object, or at least we do not know how to access the amplitude JS object. 

Is it possible to access amplitude JS object when using Amplitude in segment device mode?

Hi @Shays ,

 

Sorry for the late reply, I was OOO yesterday.

 

I have heard of issues with people using Segment in Device mode. However, I have often been told from Segment’s support that customers should really use the Amplitude Actions destination. I do not believe it is possible to access the Amplitude JS object but you should be able to set up a proxy server following this guide → https://www.docs.developers.amplitude.com/analytics/domain-proxy/

 

I hope this helps!

 

Kind Regards,
Denis


Thanks @Denis Holmes , so as said, we cannot really setup proxy without the ability to actually configure the client side. So we started on investigating the affect of moving our from device mode into cloud (actions destination is the same as cloud). 

I hope it will work out for us. Thing is - if the segment/amplitude integration code was a little bit more complex, and would allow configuring the amplitude BE URL, it was really great.. for me moving from device to cloud is not perfect, and i think also for others, but ad blockers are deal breaker.. 

I really think if you will add domain configuration ability for amplitude in device mode, would be an amazing improvement.


Thanks for the answer @Shays ! Unfortunately, we don’t seem to offer it and it would be cloud but I will take your feedback and submit it to the appropriate teaM!


Reply