question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expo-analytics-segment not sending session data for Amplitude

See original GitHub issue

🐛 Bug Report

Summary of Issue

When I use expo-analytics-segment to track events and forward them to Amplitude, all my session ids are -1, meaning they aren’t being sent.

Environment - output of expo diagnostics & the platform(s) you’re targeting

  Expo CLI 3.27.8 environment info:
    System:
      OS: macOS 10.15.6
      Shell: 3.0.2 - /usr/local/bin/fish
    Binaries:
      Node: 12.18.3 - /usr/local/bin/node
      Yarn: 1.22.5 - ~/.yarn/bin/yarn
      npm: 6.14.6 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.8.4 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
      Android SDK:
        API Levels: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27
        Build Tools: 19.1.0, 21.1.2, 23.0.1, 23.0.2, 23.0.3, 24.0.3, 25.0.0, 25.0.2, 26.0.2, 26.0.3, 28.0.2, 28.0.3
        System Images: android-29 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 3.6 AI-192.7142.36.36.6308749
      Xcode: 12.0/12A7209 - /usr/bin/xcodebuild
    npmPackages:
      expo: 37.0.12 => 37.0.12
      react: 16.9.0 => 16.9.0
      react-native: 0.61.4 => 0.61.4
      react-native-web: ^0.11.7 => 0.11.7
      react-navigation: ^4.0.10 => 4.0.10
    npmGlobalPackages:
      expo-cli: 3.17.15
    Expo Workflow: bare

Reproducible Demo

const initializeOptions = {
    iosWriteKey: IOS_WRITE_KEY,
  }
  Segment.initialize(initializeOptions)
  Segment.identifyWithTraits(id.toString())
  Segment.trackWithProperties('Test Event')

Steps to Reproduce

  1. Set up Amplitude as a destination in Segment
  2. Track an event on iOS with Segment
  3. Look at the session id in Amplitude

Expected Behavior vs Actual Behavior

Session id should not be -1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
malhotrachetancommented, Dec 1, 2020

@garrett-gottlieb Were you able to figure out the issue? I am facing this too.

0reactions
github-actions[bot]commented, Feb 10, 2022

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting the Segment / Amplitude integration
This article will describe how you can troubleshoot issues with seeing new event types or properties in Amplitude.
Read more >
How to send session info and do automated page tracking ...
I am using Segment [expo-analytics-segment] to send tracking info to Amplitude(Configured as the destination in app.segment.com) in an expo ...
Read more >
Amplitude
Please note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create...
Read more >
Amplitude Destination | Segment Documentation
Segment determines when to send events to Amplitude based on the settings you ... events do not contain any native Amplitude revenue data....
Read more >
User analytics - what have you used for your Draftbit app?
TL;DR: Use Amplitude and Branch Expo integrations. We've luckily qualified for the Segment Startup Program, so we haven't been billed. However, we've been ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found