Mixpanel Community Icon

Mixpanel: Why UTM Source and Medium Show Not Set in Server-Side API?

·
·

[UTM Source and Medium “not set” when sending data from server-side API] Hey everyone, Does any one know why Mixpanel tends to show more “not set” values for UTM Source and Medium when receiving data from server-side API? Even though the other project show correct values when receiving data from client-side SDK.

  • Avatar of Alireza S.
    Alireza S.
    ·
    ·
  • Avatar of Ansh A.
    Ansh A.
    ·
    ·

    Alireza S. This is expected. Client side automatically captures UTM because the code travels from the user's browser to Mixpanel. However, in server side, the data flows from your server to Mixpanel. And, so you need to implement special code to capture UTM in case of server side. Here's the documentation to do so.

  • Avatar of Alireza S.
    Alireza S.
    ·
    ·

    Thanks Ansh A.

  • Avatar of Alireza S.
    Alireza S.
    ·
    ·

    We’re however already setting utm parameters on server-side. We’re using “stape-io” ’s Mixpanel template and it already parses and appends utm parameters to the outgoing requests. The point is that this likely happens to google / cpc traffic which is weied.

  • Avatar of Ansh A.
    Ansh A.
    ·
    ·

    So, you're saying that only Google UTMs are being passed correctly?

  • Avatar of Alireza S.
    Alireza S.
    ·
    ·

    The other way around. We get a lot of “not set” when traffic is coming from google / cpc

  • Avatar of Ansh A.
    Ansh A.
    ·
    ·

    Probably because the links don't have utm_source in them.