Segment Integration does not appear to pass 'screen' events to Google Analytics Web Properties

#1

I have Expo sending events to Segment using both Identify and Screen. These events show up in the Segment debugger, but don’t go through to Google Analytics.

Segments documentation suggests using a web property for hybrid apps (which… I believe Expo is?) so I have a web property set up in Google Analytics.

Further, I’ve set the property id for the Mobile, Web and Server Tracking IDs in segment.

However, neither Identify nor Screen events (the only events we have instrumented) stream through to Google Analytics.

The questions that may be answerable by yall are:

  1. Should I be doing a web property or a mobile property? (Mobile properties want me to set up a firebase account, which seems… unnecessary?)
  2. Are “screen” events not forwarded (in your experience?) and should I rely on “track” events instead?
  3. Is there some other “gotcha” that is common that I may have overlooked?

Some more context:

Segment views Expo as an unsupported third party and recommends manually merging in the utm, user-agent and IP address data: https://community.segment.com/t/80pzlb/google-analytics-acquisition-all-sourcemedia-as-direct-none

Sadly that still does not send the data to Google Analytics.

#2

Segments documentation suggests using a web property for hybrid apps (which… I believe Expo is?)

Expo isn’t a hybrid app in the way they’re using the term. We don’t use a webview so you probably want to use the mobile property.

Mobile properties want me to set up a firebase account, which seems… unnecessary?

Agree that seems unnecessary. This might be a limitation in Google Analytics. You should probably be using a mobile property instead of a web property. Does Segment support forwarding events from a mobile app to a mobile property in Google Analytics? It seems like Expo will support that if it’s possible on the Google/Segment side.

#3

So, it winds out that using a Web Property is A-OK, the problem is that Google Analytics rejects events that don’t have context.app.name set; and the native Segment library infers this from the CFBundleDisplayName attribute, which is only set when you are doing standalone builds. I believe it may only be set if you manually set the app.ios.infoPlist.CFBundleDisplayName property in app.json like so:

      "infoPlist": {
        "CFBundleDisplayName": "your-app-name"
      }

There does still appear to be weirdness about the screen api not registering page-views, but I wound up getting around that by leveraging track and treating my page-views as events instead of screen.

#4

We do set CFBundleDisplayName in apps generated by exp build and exp detach.

#5

Yeah, once I detached it it started working. Is there any way you can include just ‘expo’ or something for the name for non-detached apps?

#6

Hi, can you open a github issue describing this use-case so we can track it for possible future work. Much appreciated.

#7

Done: https://github.com/expo/expo/issues/1485

closed #8

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.