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

Improve analytics tracking #31

Open
ScreamZ opened this issue Mar 13, 2018 · 2 comments
Open

Improve analytics tracking #31

ScreamZ opened this issue Mar 13, 2018 · 2 comments

Comments

@ScreamZ
Copy link

ScreamZ commented Mar 13, 2018

Hello,

It's going to be a bit complicated to properly track routing change in a middleware, can we think about a nice way to play with screen tracking middleware ?

Currently we can access the current route name and whatever that is in the router state.

It could be nice if each screens can specify a analyticsScreenName meta that depend on something like params, or pre specified configuration like routes' metas of VueJS Router.

For example at the moment I got some route named as the following :

export default StackNavigator(
  {
    ExploreHome: {
      screen: require('../../Containers/ExploreScreen').default
    },
    PatientStoriesSeeAll: {
      screen: require('../../Components/Explore/PatientStoriesSeeAll').default
    },
    CategoriesSeeAll: {
      screen: require('../../Components/Explore/CategoriesSeeAll').default
    },
    SeeAllList: {
      screen: require('../../Containers/Explore/SeeAllList').default
    }
  }

If i need to dispatch "Authenticated/Explore/ExploreHome" for ExploreHome, I need to maintain a map collection alongside, if we had the capability to add some kind of meta, this could be nice.

On declaration or directly in screen via navigationOptions.

What do you think of that ? Should we make a separate module that can be imported as redux middleware ? I can develop in a RFC if you think that's a good point.

Best regards

@ScreamZ
Copy link
Author

ScreamZ commented Oct 26, 2018

Hey @brentvatne Should I make a suggestions in RFC ?

@brentvatne
Copy link
Member

hey @ScreamZ - yeah that would be great!

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

2 participants