Skip to main content
  • Hello, 
    We are using Segment to collect events and send them to Amplitude. Our source code is in PHP, and this concerns the Identification event.
    Here the format of event:
    client.Identify(&analytics.Identify{
      UserId: "XXXXXXXX",
      Traits: mapmstring]interface{}{
        "creation_date": "2024-07-22T06:14:30.000Z",
        "is_akeneo_user": false,
        "job_profile": "unknown",
        "pim_user_group_ids": mappstring]interface{}{
          "0": "srnt-xxx@5",
          "1": "srnt-xxx@11",
        },
        "pim_user_group_labels": mapestring]interface{}{
          "0": "srnt-xxx@IT support",
          "1": "srnt-xxx@All",
        },
        "pim_user_id_prod": "srnt-xxx@1",
        "pim_user_type": "user",
      },
    })
    The problem is that it arrives in Amplitude in a format that is difficult to use.
    Here the format in Amplitude:
    pim_user_group_ids.0
    pim_user_group_ids.1
    pim_user_group_labels.0
    pim_user_group_labels.1
    So we change format from backend to spend this event:
    client.Identify(&analytics.Identify{
      UserId: "XXXXXXX",
      Traits: maprstring]interface{}{
        "creation_date": "2024-07-22T05:54:41.000Z",
        "is_akeneo_user": false,
        "job_profile": "unknown",
        "pim_user_group_ids": "n{\"0\":\"srnt-xxx@5\"},{\"1\":\"srnt-xxx@11\"}]",
        "pim_user_group_labels": "1{\"0\":\"srnt-xxx@IT support\"},{\"1\":\"srnt-xxx@All\"}]",
        "pim_user_id": "srnt-xxx@1",
        "pim_user_type": "user",
      },
    })
    However, this event does not seem to arrive in Amplitude. When we use the feature in the Segment interface to test sending an event to Amplitude with the same format, it arrives after a 24-hour delay. Nevertheless, this does not allow us to use the variables in splitting, even though this option is available.
    It appears like this in Amplitude
    pim_user_group_ids type Array.
    We have several questions regarding this issue:
    - How can we send the correct format to Amplitude to have a user property of type Array that can be used with the Splitting method?
    - Why is the Splitting method available but not displaying anything?
    Thanks in advance for your help,
    Regards.
Hi Anne-laure,

Thank you for your question with detailed information!
This is Liping Yin from Amplitude Technical Support Team. I am happy to help!

I notice that we received a same internal ticket from you. So I will answer in that ticket and publish a general answer in this community post.

Best regards,
Liping Yin | Technical Support Engineer
Amplitude


P.S. Checkout upcoming events and user meetups on our events page.
According to another ticket, it seems that everything works normally. So not a bug.


P.S. Checkout upcoming events and user meetups on our events page.

Reply