AnalyticsEvent: {
    at: string;
    detail: string;
    guildId: string | null;
    guildName: string | null;
    kind: AnalyticsEventKind;
    source: string;
    targetGuildId: string | null;
    targetGuildName: string | null;
    userId: string | null;
    userName: string | null;
}

Type declaration

  • at: string
  • detail: string

    What happened: the button type for a click, 'forced'/'voluntary' for a vote, 'join' for a referral.

  • guildId: string | null
  • guildName: string | null
  • kind: AnalyticsEventKind
  • source: string

    The surface the link was on: 'help', 'notification', 'sync', 'drops', ...

  • targetGuildId: string | null

    Referrals only: the server that was joined.

  • targetGuildName: string | null
  • userId: string | null

    Only a vote has one. A click is an unauthenticated redirect, so the server never learns who followed it - null here is the real answer, not a missing field.

  • userName: string | null

    Null when the id was not in any cluster's cache, which is not the same as having no user.