revolunet / angular-google-analytics

Google Analytics tracking for your AngularJS apps
MIT License
652 stars 179 forks source link

Change currency after initialization #188

Open KrisBraun opened 7 years ago

KrisBraun commented 7 years ago

Sometimes currency is a user-selectable option at checkout. I couldn't find a method to change the currency after configuring AnalyticsProvider. Could a method be exposed?

justinsa commented 7 years ago

@KrisBraun Do you know how this value is communicated if changed after configuration? Can you use the set method?

KrisBraun commented 7 years ago

I'm calling this, and I think it might be working:

    Analytics.set('&cu', this.currency)

It's just that I can see the saved currency is passed in the ecommerce:addTransaction call, which I assumed would override any previous set value.

tcrite commented 6 years ago

is there a setting for changing a custom metric to a currency?