Hello. If I enable device mode in my destinations,...
# support
m
Hello. If I enable device mode in my destinations, should I see requests directly to that destination or a track call will still get proxied through rudderstack?
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
h
it should go direct to the destination from the client
m
Anything else I need to do via code? I can see it load the destination's library but I don't see anything when I do a "rudderstack.track" call
which destination?
m
Yes. I already enabled it on the destination. My destination is Mixpanel and I enabled it in the section "Web SDK Settings > Use device-mode to send events"
I can see a request to
http://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js
but no other requests to the destination
h
can you try in incognito and see, perhaps your sourceConfig is cached
m
ok gimme a minute
what should I look for? I see this two
by this time it should have tracked something already
There are
track
calls though
h
yeah but it should be calling mp directly too, have you got other cloud destinations setup?
m
yeah that's what I expect. It's only Mixpanel.
Current setup is like this. I assume multiple sources should have no effect, right?
And even so, I don't see anything being sent from the "TEST backend" source
Just to be clear, I can still use
rudderstack.track
, right? The only difference is if it is in device mode, it will call the destination directly instead of going through rudderstack
💯 1
h
yeah rudder should just offload the track to mixpanel
m
Anyway, I can see you are a "community helper" so thank you for spending time with this and trying to help 🙂
h
maybe @shy-kite-21035 can assist from here
m
Yep. Hopefully I just did something wrong on my end 😅
m
Hi James, you should see an event like this being sent to mp
Copy code
?verbose=1&ip=1&_=1694784241122
m
@shy-kite-21035 yeah unfortunately I don't seem to see requests like that. I assume it should be a mp domain? like mxpnl.com or something similar, right?
Anyone around? I could use some help
Here are the request that calls mixpanel and rudderstack. I am using React btw.
I am using v2 btw
h
@many-holiday-74706 any csp issues preventing the call to mp?
m
none really. afaik it should show up in the network tab or console, right?
h
yeah csp issue will be console
have you tried creating a whole clean new source then just adding MP in device mode
just thinking what i would do
m
I inestalled nextjs and rudderstack-sdk-js v2. I added a track call. It does send to rudderstack (i see track on network) but no calls to mixpanel.
I will put up the source later. I am currently afk. but yeah, it has the same problem with the original one, it sends a track call to rudderstack but no calls to any mixpanel api.
Here's how I added it. This is from a fresh nextjs project
@hundreds-lifeguard-65770 let me know if I am missing something
h
@many-holiday-74706 right - are you using chrome
Just debugged it locally and mix disables calls if do not track is turned on
m
oh my..let me try
h
image.png
so it says "This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"
not sure if rudder can init MP with that setting
@shy-kite-21035 see ^^
m
@hundreds-lifeguard-65770 thank you so much! if I could only send you a lager right now jeez. It worked!
👍🏼 1
h
bit early for a beer 🙂
m
I'm just gonna wait for @shy-kite-21035 if there's a way to disable it programmatically
haha. thank you again! at least now I can continue with my task!
h
mixpanel has methods to opt in e.g mixpanel.opt_in_tracking() but it doesnt seem to work - it really needs the config setting in rudderstack so it inits mixpanel with this setting
image.png
m
Hey @James, sorry about that today is off in our country, so the late response.
h
@many-holiday-74706 whats stopping using cloud mode?
m
So the issue was that Mixpanel was not tracking the event since you have "Do not track" enabled in the browser?
m
@shy-kite-21035 no worries. I actually realized it is still weekend on your end. @hundreds-lifeguard-65770 incrementing people properties. yes it was enabled on all my browsers
h
ah ok
m
I have raised this to the team to support this as a feature and will keep you posted.
❤️ 1
Hi James, this was released today but the doc for it is pending.