Hi! We’re using Mixpanel in cloud mode and make us...
# support
g
Hi! We’re using Mixpanel in cloud mode and make use of the MP
Group Analytics
paid add-on. Whenever we send a
group
call via RS, it overwrites the user’s location details in MP with RudderStack’s server location because the
<http://mixpanel.com/engage|mixpanel.com/engage>
API request is incredibly stripped down - namely it lacks the user’s
$ip
. Is there any way we can customize this request? Failing that, what other options do we have? Thanks
👀 1
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.
q
Unfortunately, this was not covered in the initial implementation. We are adding this capability now and you can expect it to be available in the next couple of weeks. I will keep you informed.
🙌 1
g
That’s great Akhilesh, thank you. We’ll disable it for now until it’s there.
Hey Akhilesh, do you have any update to share on this one? AHey
q
Hey @gorgeous-dream-88338 we have released this, can you give it a try!
g
Thanks for the heads up @quiet-wolf-72320. I've tried with a very simple test file but so far it's still registering a user as Virginia, US when the
group
call is sent. Some findings which may or may not help: • Sending
window.rudderanalytics.group('test')
and using
groupId
as the key results in two requests to Mixpanel: ◦
/engage
presumably to update or set the user's groupId property on their profile - live events to Mixpanel shows:
Copy code
"JSON_ARRAY": {
    "batch": [
        {
            "$token": "redacted",
            "$distinct_id": "test-id-123",
            "$set": {
                "groupId": [
                    "test"
                ]
            }
        }
    ]
}
/groups
presumably to update or create the group
Copy code
"JSON_ARRAY": {
    "batch": [
        {
            "$token": "87454b28224e9f6be63124a50208a790",
            "$group_key": "groupId",
            "$group_id": "test",
            "$set": {}
        }
    ]
}
◦ Note the lack of
$ip
in the call to
/engage
in this instance. • Sending
window.rudderanalytics.group('test', { workspace_id: 'test' })
with any trait (in this case I've also added
workspace_id
as a valid group key) results in these two requests to Mixpanel: ◦
/engage
- there is now an
$ip
property, but it's only part of the second
$set
object along with the user's and group's traits. I am 10/10 on refreshes and it always results in Virginia, US. I'm not sure what this suggests, whether it's how Mixpanel processes the order of batched
$sets
or otherwise, but hopefully helpful to know?
Copy code
"JSON_ARRAY": {
    "batch": [
        {
            "$token": "redacted",
            "$distinct_id": "test-id-123",
            "$set": {
                "groupId": [
                    "test"
                ]
            }
        },
        {
            "$set": {
                "$email": "<mailto:test-1691403582189@test.com|test-1691403582189@test.com>",
                "$name": "Test 1691403582189",
                "$screen_height": 1080,
                "$screen_width": 1920,
                "$initial_referrer": "$direct",
                "workspace_id": "test",
                "$browser": "Chrome",
                "$browser_version": "115.0.0.0"
            },
            "$token": "redacted",
            "$distinct_id": "test-id-123",
            "$ip": "redacted",
            "$time": 1691403583
        }
    ]
}
/group
does not change. I'm not sure if there are any special conditions we need to set or values we need to send in order to make this work as expected?
m
@proud-florist-94806 can you take a look at this?
👍 1
g
I can at least confirm that if I query with Mixpanel directly & pass through
$ip
against both
$set
objects it works as needed -- hopefully that's all to then get this working properly 🙏
Copy code
const options = {
    method: 'POST',
    headers: {accept: 'text/plain', 'content-type': 'application/json'},
    body: JSON.stringify([
        {
            $token: 'redacted',
            $distinct_id: 'test-id-123',
            $set: {groupId: 'test'},
            $ip: 'redacted'
          },
          {
            $token: 'redacted',
            $distinct_id: 'test-id-123',
            $set: {other: 'key'},
            $ip: 'redacted'
          }
    ])
  };
👍 1
Just catching up on this thread -- we're not seeing a fix for this yet, there's still no IP sent along with the Mixpanel
group
call resulting in users still being tagged as US Virginia. Any updates?
m
Hi Jon, I will check on this and get back to you.
Sorry for the delay, will provide an update in a day or two.