Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen Spec #68

Closed
zachrnolan opened this issue Feb 3, 2017 · 10 comments
Closed

Screen Spec #68

zachrnolan opened this issue Feb 3, 2017 · 10 comments

Comments

@zachrnolan
Copy link

Hi, thanks for all your work on this!

How would I call the screen spec? I have Identity and Track working properly, but it doesn't seem to accept analytics.screen().

Using this in a React Native project and would be awesome if I could track screen views as well.

Thanks!

@agnaf
Copy link

agnaf commented Feb 13, 2017

@neiker I am also very interested to do this. 'Screen' needs to also work for the mobile app.

I understand that you are using the analytics-node logic, which does not have a screen.

Is there a workaround to have "Screen" as well? Should we use "Page" instead? Not sure if this is proper though. Any ideas?

Thanks.

@afilp
Copy link

afilp commented Feb 13, 2017

May I assume that we also miss other goodies by using the analytics-node variant of segment?

For example, what happens with the anonymous ID? How can we use the automatic feature?
"Note: In our browser and mobile libraries a User ID is automatically added from the state stored by a previous identify call, so you do not need to add it yourself. They will also automatically handle Anonymous ID’s under the covers."

Also, how can we get information related to the device?

@neiker
Copy link
Owner

neiker commented Feb 13, 2017

Hi @afilp and @zachrnolan

Since now you can use this package in node, browser and react native, I think is a good idea to rename it to analytics-universal and then create another project who uses analytics-universal and add there the mobile only features like screen tracking or device info (this will require a native module like react-native-device-info). I'm interested in know what do you think.

Here's the PR: https://github.com/neiker/analytics-react-native/pull/37/files

@zachrnolan
Copy link
Author

@neiker I think that's a great idea. We'll need to hook into https://github.com/segmentio/analytics-ios to get access to the Screen API. It requires the use of cocoapods or a manual setup with quiet a long list of dependencies.

@afilp As a current workaround, I'm using a regular event and calling it "ScreenView" and passing in the name of the screen as part of the properties. It seems to be okay data wise for our team using Segment/Mixpanel.

@afilp
Copy link

afilp commented Feb 14, 2017

@zachrnolan Thanks. As a workaround I am using the ".page" method, with custom properties, seems to be working. Is this a bad workaround? (please let me know if I miss something here), is your workaround better? Thanks.

@afilp
Copy link

afilp commented Feb 14, 2017

Also, would that help to get rid of CocoaPods? segmentio/analytics-ios#531

I see that someone mentioned this before and the issue is closed in favor of the issue above:
segmentio/analytics-ios#526

@zachrnolan
Copy link
Author

zachrnolan commented Feb 14, 2017

@afilp I don't see anything wrong with using Page as a workaround. It really just depends on how you are using the data in other applications connected to segment (mixpanel, etc). I'm guessing there are some applications out there that do something special with the Screen data, otherwise they probably wouldn't bother with a separate method.

Thanks for the links, I did see that you could get rid of CocoaPods, but it requires the installation of the segmentio ios library which seemed like more work at the time than this library =).

@afilp
Copy link

afilp commented Feb 15, 2017

@zachrnolan Do you think that you can implement this idea? "We'll need to hook into https://github.com/segmentio/analytics-ios to get access to the Screen API"

I really want to use your library rather than https://github.com/smore-inc/react-native-segment-io-analytics
(which uses CocoaPods...)

Thanks!

@neiker
Copy link
Owner

neiker commented Feb 20, 2017

I take a look on this and think it's easy to implement. Just need to duplicate page method https://github.com/neiker/analytics-react-native/blob/master/src/index.js#L130 changing the type from 'page' to 'screen'
Doc here: https://segment.com/docs/spec/screen/

I will make this changes in a couple of days, or if someone want to do it, make the changes, tests and send a pull request

@neiker
Copy link
Owner

neiker commented Mar 3, 2017

New version was released with those changes https://github.com/neiker/analytics-react-native/releases/tag/v1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants