Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Analytics 2.0 session_id reset #666

Open
@luigi7up

Description

Hi everyone, I'm using Analytics 2.0 in my VUE js app that sends data to Amplitude Actions destination. I can see that the analytics 2.0 is managing the session_id unlike the Analyitics 1.0 which is a great out-of-a-box feature for those integrating with Amplitude.

Nevertheless, I want to manually reset the session_id as part of the user's logout() and I am unable to do so...

According the Segment docs this should be possible by providing an object integrations in the Track or Identify calls

window.analytics.identify(currentUser.id, {
        name: name,
        email: email,
        ab_test: ab_tests,
      },{
          integrations: {
            "Actions Amplitude": {
              session_id: 1644915970111
            },"Amplitude": {
              session_id: 1644915970111
            }
          }
      });

I tried passing both integrations.Actions Amplitude.session_id and integrations.Amplitude.session_id value manually to override the one that Analytics 2.0 sets manually, but it still doesn't send my custom value neither to Segment or Amplitude

Also, I tried calling window.analytics.reset() but it doesn't seem to affect the sesison_id

Could you please help me with the correct approach to achieving a new session_id each time a user logs in / logs out?

Thank you

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions