angular-ga icon indicating copy to clipboard operation
angular-ga copied to clipboard

Request for 2 additional params to the configure method in your code?

Open tonym99 opened this issue 7 years ago • 1 comments

Can you add the other optional params for the configure method in your code? This would be much appreciated!

Google allows several more params to the create call which include "name" and "userId". You currently only provide 2 params - trackingId and cookieDomain. It seems like all you have to do is modify these 2 lines of code in your angular-ga.js file:

configure(trackingId, options = 'auto') { ga('create', trackingId, options);

This is from the Google Analytics site - https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_with_multiple_trackers

ga('create', { trackingId: 'UA-XXXXX-Y', cookieDomain: 'auto', name: 'myTracker', userId: '12345' });

tonym99 avatar Jul 25 '18 14:07 tonym99

PR welcome!

SamVerschueren avatar Jul 25 '18 18:07 SamVerschueren