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

Add multiple tracker support GA events #290

Conversation

tarikhamilton
Copy link
Contributor

@tarikhamilton tarikhamilton commented Sep 26, 2018

Trackers now support an array or string and will fire an event to multiple trackers, if specified.

Checklist

  • I have added tests that prove my fix is effective or that my feature works.
  • I have added all necessary documentation (if appropriate)

What was done

I made trackers in Google Analytics events support arrays of named trackers. You will now be able to achieve this:

const eventsMap = {
  [LOCATION_CHANGE]: trackPageView(
    action => ({
      hitType: 'pageview',
      page: action.payload.pathname
    }),
    ['trackerOne', 'trackerTwo']
  )
};

Associated Issues

#289

Trackers now supports an array or string and will fire an event to multiple trackers, if specified.
@tarikhamilton tarikhamilton changed the base branch from master to v1.2.x September 26, 2018 19:22
@tarikhamilton tarikhamilton changed the base branch from v1.2.x to master September 26, 2018 20:00
@ttmarek ttmarek merged commit 732e42e into rangle:master Oct 3, 2018
@ttmarek
Copy link
Contributor

ttmarek commented Oct 3, 2018

@tarikhamilton absolutely fantastic!

These changes are available in @redux-beacon/google-analytics@1.1.0. Enjoy!

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

Successfully merging this pull request may close these issues.

2 participants