-
Notifications
You must be signed in to change notification settings - Fork 992
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
Sending Settings v2 events to Koala #389
Changes from 1 commit
83c7e2f
12d64ab
689ae33
787be98
78782ed
938a224
c9ad639
ec6408d
e70b368
e800155
e3e9c73
d6a715c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,7 @@ import com.crashlytics.android.answers.CustomEvent | |
fun fabricLogCustomEvent(customEvent: String) { | ||
Answers.getInstance().logCustom(CustomEvent(customEvent)) | ||
} | ||
|
||
fun fabricLogCustomEventWithAttributes(customEvent: String, key: String, attribute: String) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method sends a single attribute along with an event. My understanding was that we wanted to send all of the attributes we send to Koala to Fabric/Firebase. Which is why @justinswart was running into the limit issue. I know Justin said he's going to do some more exploration with Fabric/Firebase. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the issue was that he was sending all of the default properties along with the custom event which we don't need to do because we get that from Fabric automatically. (Device, OS, etc..) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh cool, @Rcureton please show me where to find that in Fabric, I could only see the custom attributes on the event that I was logging. Also - I'm not seeing any of that stuff appearing in Firebase yet 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @justinswart So for us to be able to see events in Firebase we'll have to use the Firebase SDK. Right now the only thing that transfers over are the crash reports. Also I thought |
||
Answers.getInstance().logCustom(CustomEvent(customEvent).putCustomAttribute(key, attribute)) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,30 +299,30 @@ public void trackSignupNewsletterToggle(final boolean sendNewsletters) { | |
|
||
// SETTINGS | ||
public void trackChangedEmail() { | ||
this.client.track(KoalaEvent.CHANGED_EMAIL); | ||
this.client.track(KoalaEvent.CHANGED_EMAIL, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.CHANGED_EMAIL); | ||
} | ||
|
||
public void trackChangedPassword() { | ||
this.client.track(KoalaEvent.CHANGED_PASSWORD); | ||
this.client.track(KoalaEvent.CHANGED_PASSWORD, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.CHANGED_PASSWORD); | ||
} | ||
public void trackContactEmailClicked() { | ||
this.client.track("Contact Email Clicked"); | ||
} | ||
|
||
public void trackDeletePaymentMethod() { | ||
this.client.track(KoalaEvent.DELETED_PAYMENT_METHOD); | ||
this.client.track(KoalaEvent.DELETED_PAYMENT_METHOD, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.DELETED_PAYMENT_METHOD); | ||
} | ||
|
||
public void trackErroredDeletePaymentMethod() { | ||
this.client.track(KoalaEvent.ERRORED_DELETE_PAYMENT_METHOD); | ||
this.client.track(KoalaEvent.ERRORED_DELETE_PAYMENT_METHOD, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.ERRORED_DELETE_PAYMENT_METHOD); | ||
} | ||
|
||
public void trackFailedPaymentMethodCreation() { | ||
this.client.track(KoalaEvent.FAILED_PAYMENT_METHOD_CREATION); | ||
this.client.track(KoalaEvent.FAILED_PAYMENT_METHOD_CREATION, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.FAILED_PAYMENT_METHOD_CREATION); | ||
} | ||
|
||
|
@@ -335,62 +335,62 @@ public void trackNewsletterToggle(final boolean sendNewsletter) { | |
} | ||
|
||
public void trackResentVerificationEmail() { | ||
this.client.track(KoalaEvent.RESENT_VERIFICATION_EMAIL); | ||
this.client.track(KoalaEvent.RESENT_VERIFICATION_EMAIL, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.RESENT_VERIFICATION_EMAIL); | ||
} | ||
|
||
public void trackSavedPaymentMethod() { | ||
this.client.track(KoalaEvent.SAVED_PAYMENT_METHOD); | ||
this.client.track(KoalaEvent.SAVED_PAYMENT_METHOD, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.SAVED_PAYMENT_METHOD); | ||
} | ||
|
||
public void trackSelectedChosenCurrency() { | ||
this.client.track(KoalaEvent.SELECTED_CHOSEN_CURRENCY); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.SELECTED_CHOSEN_CURRENCY); | ||
public void trackSelectedChosenCurrency(String selectedCurrency) { | ||
this.client.trackEventType(KoalaEvent.SELECTED_CHOSEN_CURRENCY, this.client.defaultProperties(), selectedCurrency); | ||
AnswersExtKt.fabricLogCustomEventWithAttributes(KoalaEvent.SELECTED_CHOSEN_CURRENCY, "currency", selectedCurrency); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought we're not doing any more Fabric events. 👀 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed! |
||
} | ||
|
||
public void trackSettingsView() { | ||
this.client.track("Settings View"); | ||
this.client.track("Settings View",this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.VIEWED_SETTINGS); | ||
} | ||
|
||
public void trackViewedAccount() { | ||
this.client.track(KoalaEvent.VIEWED_ACCOUNT); | ||
this.client.track(KoalaEvent.VIEWED_ACCOUNT, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.VIEWED_ACCOUNT); | ||
} | ||
|
||
public void trackViewedAddNewCard() { | ||
this.client.track(KoalaEvent.VIEWED_ADD_NEW_CARD); | ||
this.client.track(KoalaEvent.VIEWED_ADD_NEW_CARD, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.VIEWED_ADD_NEW_CARD); | ||
} | ||
|
||
public void trackViewedChangedEmail() { | ||
this.client.track(KoalaEvent.VIEWED_CHANGE_EMAIL); | ||
this.client.track(KoalaEvent.VIEWED_CHANGE_EMAIL, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.VIEWED_CHANGE_EMAIL); | ||
} | ||
|
||
public void trackViewedChangedPassword() { | ||
this.client.track(KoalaEvent.VIEWED_CHANGE_PASSWORD); | ||
this.client.track(KoalaEvent.VIEWED_CHANGE_PASSWORD, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.VIEWED_CHANGE_PASSWORD); | ||
} | ||
|
||
public void trackViewedNotifications() { | ||
this.client.track(KoalaEvent.VIEWED_NOTIFICATIONS); | ||
this.client.track(KoalaEvent.VIEWED_NOTIFICATIONS, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.VIEWED_NOTIFICATIONS); | ||
} | ||
|
||
public void trackViewedNewsletter() { | ||
this.client.track(KoalaEvent.VIEWED_NEWSLETTER); | ||
this.client.track(KoalaEvent.VIEWED_NEWSLETTER, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.VIEWED_NEWSLETTER); | ||
} | ||
|
||
public void trackViewedPaymentMethods() { | ||
this.client.track(KoalaEvent.VIEWED_PAYMENT_METHODS); | ||
this.client.track(KoalaEvent.VIEWED_PAYMENT_METHODS, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.VIEWED_PAYMENT_METHODS); | ||
} | ||
|
||
public void trackViewedPrivacy() { | ||
this.client.track(KoalaEvent.VIEWED_PRIVACY); | ||
this.client.track(KoalaEvent.VIEWED_PRIVACY, this.client.defaultProperties()); | ||
AnswersExtKt.fabricLogCustomEvent(KoalaEvent.VIEWED_PRIVACY); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we kill this extension until we decide we're using Fabric officially?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Killed!