Showing
7 changed files
with
93 additions
and
1 deletions
... | @@ -18,6 +18,7 @@ import com.bumptech.glide.Glide; | ... | @@ -18,6 +18,7 @@ import com.bumptech.glide.Glide; |
18 | import com.bumptech.glide.load.engine.DiskCacheStrategy; | 18 | import com.bumptech.glide.load.engine.DiskCacheStrategy; |
19 | import com.google.android.material.bottomsheet.BottomSheetDialog; | 19 | import com.google.android.material.bottomsheet.BottomSheetDialog; |
20 | 20 | ||
21 | +import org.greenrobot.eventbus.EventBus; | ||
21 | import org.json.JSONArray; | 22 | import org.json.JSONArray; |
22 | import org.json.JSONException; | 23 | import org.json.JSONException; |
23 | import org.json.JSONObject; | 24 | import org.json.JSONObject; |
... | @@ -26,8 +27,10 @@ import ly.warp.sdk.R; | ... | @@ -26,8 +27,10 @@ import ly.warp.sdk.R; |
26 | import ly.warp.sdk.io.callbacks.CallbackReceiver; | 27 | import ly.warp.sdk.io.callbacks.CallbackReceiver; |
27 | import ly.warp.sdk.io.models.Consumer; | 28 | import ly.warp.sdk.io.models.Consumer; |
28 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | 29 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; |
30 | +import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | ||
29 | import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest; | 31 | import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest; |
30 | import ly.warp.sdk.io.request.WarplyConsumerRequest; | 32 | import ly.warp.sdk.io.request.WarplyConsumerRequest; |
33 | +import ly.warp.sdk.utils.managers.WarplyEventBusManager; | ||
31 | import ly.warp.sdk.utils.managers.WarplyManager; | 34 | import ly.warp.sdk.utils.managers.WarplyManager; |
32 | 35 | ||
33 | 36 | ||
... | @@ -229,6 +232,13 @@ public class ContextualActivity extends Activity implements View.OnClickListener | ... | @@ -229,6 +232,13 @@ public class ContextualActivity extends Activity implements View.OnClickListener |
229 | } | 232 | } |
230 | 233 | ||
231 | private void errorActivatingDialog() { | 234 | private void errorActivatingDialog() { |
235 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
236 | + analyticsEvent.setEventName("loyalty_offer_activated"); | ||
237 | + analyticsEvent.setParameter("name", mCCMS.getTitle()); | ||
238 | + analyticsEvent.setParameter("type", "gift"); | ||
239 | + analyticsEvent.setParameter("successful", "false"); | ||
240 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
241 | + | ||
232 | mAlertDialogErrorActivating = new AlertDialog.Builder(this) | 242 | mAlertDialogErrorActivating = new AlertDialog.Builder(this) |
233 | .setTitle(R.string.cos_dlg_error_title) | 243 | .setTitle(R.string.cos_dlg_error_title) |
234 | .setMessage(R.string.cos_dlg_error_subtitle) | 244 | .setMessage(R.string.cos_dlg_error_subtitle) |
... | @@ -239,6 +249,13 @@ public class ContextualActivity extends Activity implements View.OnClickListener | ... | @@ -239,6 +249,13 @@ public class ContextualActivity extends Activity implements View.OnClickListener |
239 | } | 249 | } |
240 | 250 | ||
241 | private void successActivatingDialog() { | 251 | private void successActivatingDialog() { |
252 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
253 | + analyticsEvent.setEventName("loyalty_offer_activated"); | ||
254 | + analyticsEvent.setParameter("name", mCCMS.getTitle()); | ||
255 | + analyticsEvent.setParameter("type", "gift"); | ||
256 | + analyticsEvent.setParameter("successful", "true"); | ||
257 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
258 | + | ||
242 | mAlertDialogSuccessActivating = new AlertDialog.Builder(this) | 259 | mAlertDialogSuccessActivating = new AlertDialog.Builder(this) |
243 | .setTitle(R.string.cos_dlg_activate_success_title) | 260 | .setTitle(R.string.cos_dlg_activate_success_title) |
244 | .setMessage(R.string.cos_dlg_activate_success_subtitle) | 261 | .setMessage(R.string.cos_dlg_activate_success_subtitle) | ... | ... |
... | @@ -32,6 +32,7 @@ import ly.warp.sdk.io.models.Coupon; | ... | @@ -32,6 +32,7 @@ import ly.warp.sdk.io.models.Coupon; |
32 | import ly.warp.sdk.io.models.CouponList; | 32 | import ly.warp.sdk.io.models.CouponList; |
33 | import ly.warp.sdk.io.models.Couponset; | 33 | import ly.warp.sdk.io.models.Couponset; |
34 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | 34 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; |
35 | +import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | ||
35 | import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel; | 36 | import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel; |
36 | import ly.warp.sdk.io.request.WarplyGetCampaignsRequest; | 37 | import ly.warp.sdk.io.request.WarplyGetCampaignsRequest; |
37 | import ly.warp.sdk.io.request.WarplyRedeemCouponRequest; | 38 | import ly.warp.sdk.io.request.WarplyRedeemCouponRequest; |
... | @@ -201,13 +202,13 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -201,13 +202,13 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
201 | mCoupon.setDescription(mCouponset.getShortDescription()); | 202 | mCoupon.setDescription(mCouponset.getShortDescription()); |
202 | mCoupon.setImage(mCouponset.getImgPreview()); | 203 | mCoupon.setImage(mCouponset.getImgPreview()); |
203 | mCoupon.setName(mCouponset.getName()); | 204 | mCoupon.setName(mCouponset.getName()); |
205 | + showDialog(true, 1); | ||
204 | new Thread(() -> { | 206 | new Thread(() -> { |
205 | if (!Thread.currentThread().isInterrupted()) { | 207 | if (!Thread.currentThread().isInterrupted()) { |
206 | WarplyManager.getUserCouponsWithCouponsets(new WarplyUserCouponsRequest(), mUserCouponsReceiver); | 208 | WarplyManager.getUserCouponsWithCouponsets(new WarplyUserCouponsRequest(), mUserCouponsReceiver); |
207 | WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), mCampaignsCallback); | 209 | WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), mCampaignsCallback); |
208 | } | 210 | } |
209 | }).start(); | 211 | }).start(); |
210 | - showDialog(true, 1); | ||
211 | } else { | 212 | } else { |
212 | showDialog(false, status); | 213 | showDialog(false, status); |
213 | } | 214 | } |
... | @@ -222,6 +223,13 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -222,6 +223,13 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
222 | 223 | ||
223 | private void showDialog(boolean success, int status) { | 224 | private void showDialog(boolean success, int status) { |
224 | if (success) { | 225 | if (success) { |
226 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
227 | + analyticsEvent.setEventName("loyalty_offer_activated"); | ||
228 | + analyticsEvent.setParameter("name", mLoyalty.getTitle()); | ||
229 | + analyticsEvent.setParameter("type", "coupon"); | ||
230 | + analyticsEvent.setParameter("successful", "true"); | ||
231 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
232 | + | ||
225 | mAlertDialogCouponset = new AlertDialog.Builder(this) | 233 | mAlertDialogCouponset = new AlertDialog.Builder(this) |
226 | .setTitle(R.string.cos_dlg_success_couponset_title) | 234 | .setTitle(R.string.cos_dlg_success_couponset_title) |
227 | .setMessage(R.string.cos_dlg_success_couponset_subtitle) | 235 | .setMessage(R.string.cos_dlg_success_couponset_subtitle) |
... | @@ -233,6 +241,13 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -233,6 +241,13 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
233 | }) | 241 | }) |
234 | .show(); | 242 | .show(); |
235 | } else { | 243 | } else { |
244 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
245 | + analyticsEvent.setEventName("loyalty_offer_activated"); | ||
246 | + analyticsEvent.setParameter("name", mLoyalty.getTitle()); | ||
247 | + analyticsEvent.setParameter("type", "coupon"); | ||
248 | + analyticsEvent.setParameter("successful", "false"); | ||
249 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
250 | + | ||
236 | if (status == 3) { | 251 | if (status == 3) { |
237 | mAlertDialogCouponset = new AlertDialog.Builder(this) | 252 | mAlertDialogCouponset = new AlertDialog.Builder(this) |
238 | .setTitle(R.string.cos_dlg_error_title) | 253 | .setTitle(R.string.cos_dlg_error_title) | ... | ... |
... | @@ -35,6 +35,7 @@ import ly.warp.sdk.io.models.Couponset; | ... | @@ -35,6 +35,7 @@ import ly.warp.sdk.io.models.Couponset; |
35 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | 35 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; |
36 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent; | 36 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent; |
37 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage; | 37 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage; |
38 | +import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | ||
38 | import ly.warp.sdk.io.models.MergedGifts; | 39 | import ly.warp.sdk.io.models.MergedGifts; |
39 | import ly.warp.sdk.services.EventCampaignService; | 40 | import ly.warp.sdk.services.EventCampaignService; |
40 | import ly.warp.sdk.utils.WarpJSONParser; | 41 | import ly.warp.sdk.utils.WarpJSONParser; |
... | @@ -235,6 +236,12 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene | ... | @@ -235,6 +236,12 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene |
235 | String cpnUuid = campaignSettings.optString("couponset"); | 236 | String cpnUuid = campaignSettings.optString("couponset"); |
236 | for (Couponset cpns : WarplyManagerHelper.getCouponsets()) { | 237 | for (Couponset cpns : WarplyManagerHelper.getCouponsets()) { |
237 | if (cpns.getUuid().equals(cpnUuid)) { | 238 | if (cpns.getUuid().equals(cpnUuid)) { |
239 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
240 | + analyticsEvent.setEventName("loyalty_sdk_offer_selected"); | ||
241 | + analyticsEvent.setParameter("name", dataItem.getCampaign().getTitle()); | ||
242 | + analyticsEvent.setParameter("type", "coupon"); | ||
243 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
244 | + | ||
238 | WarplyManager.getSingleCampaign(dataItem.getCampaign().getSessionUUID()); | 245 | WarplyManager.getSingleCampaign(dataItem.getCampaign().getSessionUUID()); |
239 | Intent intent = new Intent(GiftsForYouActivity.this, CouponsetInfoActivity.class); | 246 | Intent intent = new Intent(GiftsForYouActivity.this, CouponsetInfoActivity.class); |
240 | intent.putExtra("couponset", (Serializable) cpns); | 247 | intent.putExtra("couponset", (Serializable) cpns); |
... | @@ -263,6 +270,12 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene | ... | @@ -263,6 +270,12 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene |
263 | String cpnUuid = campaignSettings.optString("couponset"); | 270 | String cpnUuid = campaignSettings.optString("couponset"); |
264 | for (Couponset cpns : WarplyManagerHelper.getCouponsets()) { | 271 | for (Couponset cpns : WarplyManagerHelper.getCouponsets()) { |
265 | if (cpns.getUuid().equals(cpnUuid)) { | 272 | if (cpns.getUuid().equals(cpnUuid)) { |
273 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
274 | + analyticsEvent.setEventName("loyalty_sdk_offer_selected"); | ||
275 | + analyticsEvent.setParameter("name", dataItem.getCampaign().getTitle()); | ||
276 | + analyticsEvent.setParameter("type", "coupon"); | ||
277 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
278 | + | ||
266 | WarplyManager.getSingleCampaign(dataItem.getCampaign().getSessionUUID()); | 279 | WarplyManager.getSingleCampaign(dataItem.getCampaign().getSessionUUID()); |
267 | Intent intent = new Intent(GiftsForYouActivity.this, CouponsetInfoActivity.class); | 280 | Intent intent = new Intent(GiftsForYouActivity.this, CouponsetInfoActivity.class); |
268 | intent.putExtra("couponset", (Serializable) cpns); | 281 | intent.putExtra("couponset", (Serializable) cpns); |
... | @@ -320,6 +333,12 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene | ... | @@ -320,6 +333,12 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene |
320 | seasonalCLick.setContext(GiftsForYouActivity.this); | 333 | seasonalCLick.setContext(GiftsForYouActivity.this); |
321 | EventBus.getDefault().post(new WarplyEventBusManager(seasonalCLick)); | 334 | EventBus.getDefault().post(new WarplyEventBusManager(seasonalCLick)); |
322 | } else if (dataItem.getDataType() == 3) { | 335 | } else if (dataItem.getDataType() == 3) { |
336 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
337 | + analyticsEvent.setEventName("loyalty_sdk_offer_selected"); | ||
338 | + analyticsEvent.setParameter("name", dataItem.getCCMS().getTitle()); | ||
339 | + analyticsEvent.setParameter("type", "gift"); | ||
340 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
341 | + | ||
323 | Intent intent = new Intent(GiftsForYouActivity.this, ContextualActivity.class); | 342 | Intent intent = new Intent(GiftsForYouActivity.this, ContextualActivity.class); |
324 | intent.putExtra("ccms", dataItem.getCCMS()); | 343 | intent.putExtra("ccms", dataItem.getCCMS()); |
325 | startActivity(intent); | 344 | startActivity(intent); | ... | ... |
... | @@ -44,6 +44,7 @@ import ly.warp.sdk.io.models.ActiveDFYCouponEventModel; | ... | @@ -44,6 +44,7 @@ import ly.warp.sdk.io.models.ActiveDFYCouponEventModel; |
44 | import ly.warp.sdk.io.models.ActiveDFYCouponModel; | 44 | import ly.warp.sdk.io.models.ActiveDFYCouponModel; |
45 | import ly.warp.sdk.io.models.Coupon; | 45 | import ly.warp.sdk.io.models.Coupon; |
46 | import ly.warp.sdk.io.models.CouponList; | 46 | import ly.warp.sdk.io.models.CouponList; |
47 | +import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | ||
47 | import ly.warp.sdk.io.models.WarplyDealsAnalysisEventModel; | 48 | import ly.warp.sdk.io.models.WarplyDealsAnalysisEventModel; |
48 | import ly.warp.sdk.utils.WarpUtils; | 49 | import ly.warp.sdk.utils.WarpUtils; |
49 | import ly.warp.sdk.utils.WarplyManagerHelper; | 50 | import ly.warp.sdk.utils.WarplyManagerHelper; |
... | @@ -201,9 +202,19 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -201,9 +202,19 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
201 | WarplyDealsAnalysisEventModel warplyDealsAnalysisEventModel = new WarplyDealsAnalysisEventModel(); | 202 | WarplyDealsAnalysisEventModel warplyDealsAnalysisEventModel = new WarplyDealsAnalysisEventModel(); |
202 | warplyDealsAnalysisEventModel.setPressed(true); | 203 | warplyDealsAnalysisEventModel.setPressed(true); |
203 | EventBus.getDefault().post(new WarplyEventBusManager(warplyDealsAnalysisEventModel)); | 204 | EventBus.getDefault().post(new WarplyEventBusManager(warplyDealsAnalysisEventModel)); |
205 | + | ||
206 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
207 | + analyticsEvent.setEventName("did_tap_deals_for_you_badge"); | ||
208 | + analyticsEvent.setParameter("screen", "Loyalty Wallet"); | ||
209 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
204 | return; | 210 | return; |
205 | } | 211 | } |
206 | if (view.getId() == R.id.cl_deals_win) { | 212 | if (view.getId() == R.id.cl_deals_win) { |
213 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
214 | + analyticsEvent.setEventName("did_tap_gifts_for_you_badge"); | ||
215 | + analyticsEvent.setParameter("screen", "Loyalty Wallet"); | ||
216 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
217 | + | ||
207 | Intent intent = new Intent(LoyaltyWallet.this, LoyaltyAnalysisActivity.class); | 218 | Intent intent = new Intent(LoyaltyWallet.this, LoyaltyAnalysisActivity.class); |
208 | startActivity(intent); | 219 | startActivity(intent); |
209 | return; | 220 | return; | ... | ... |
... | @@ -571,6 +571,12 @@ public class MoreForYouActivity extends Activity implements View.OnClickListener | ... | @@ -571,6 +571,12 @@ public class MoreForYouActivity extends Activity implements View.OnClickListener |
571 | } | 571 | } |
572 | 572 | ||
573 | private void handleMoreContextualItemClick(LoyaltyContextualOfferModel ccmsItem) { | 573 | private void handleMoreContextualItemClick(LoyaltyContextualOfferModel ccmsItem) { |
574 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
575 | + analyticsEvent.setEventName("loyalty_sdk_offer_selected"); | ||
576 | + analyticsEvent.setParameter("name", ccmsItem.getTitle()); | ||
577 | + analyticsEvent.setParameter("type", "gift"); | ||
578 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
579 | + | ||
574 | Intent intent = new Intent(MoreForYouActivity.this, ContextualActivity.class); | 580 | Intent intent = new Intent(MoreForYouActivity.this, ContextualActivity.class); |
575 | intent.putExtra("ccms", ccmsItem); | 581 | intent.putExtra("ccms", ccmsItem); |
576 | startActivity(intent); | 582 | startActivity(intent); | ... | ... |
... | @@ -71,6 +71,7 @@ import ly.warp.sdk.io.models.CustomerStateModel; | ... | @@ -71,6 +71,7 @@ import ly.warp.sdk.io.models.CustomerStateModel; |
71 | import ly.warp.sdk.io.models.LoyaltyBadgeModel; | 71 | import ly.warp.sdk.io.models.LoyaltyBadgeModel; |
72 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | 72 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; |
73 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage; | 73 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage; |
74 | +import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | ||
74 | import ly.warp.sdk.io.models.MerchantList; | 75 | import ly.warp.sdk.io.models.MerchantList; |
75 | import ly.warp.sdk.io.models.PushCampaign; | 76 | import ly.warp.sdk.io.models.PushCampaign; |
76 | import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel; | 77 | import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel; |
... | @@ -646,6 +647,12 @@ public class WarplyManagerHelper { | ... | @@ -646,6 +647,12 @@ public class WarplyManagerHelper { |
646 | public static void handleContextualCampaigns(Context context, LoyaltyContextualOfferModel item) { | 647 | public static void handleContextualCampaigns(Context context, LoyaltyContextualOfferModel item) { |
647 | if (item != null) { | 648 | if (item != null) { |
648 | if (TextUtils.isEmpty(item.getLoyaltyCampaignId()) || item.getLoyaltyCampaignId().equals("NA")) { | 649 | if (TextUtils.isEmpty(item.getLoyaltyCampaignId()) || item.getLoyaltyCampaignId().equals("NA")) { |
650 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
651 | + analyticsEvent.setEventName("loyalty_sdk_offer_selected"); | ||
652 | + analyticsEvent.setParameter("name", item.getTitle()); | ||
653 | + analyticsEvent.setParameter("type", "gift"); | ||
654 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
655 | + | ||
649 | Intent intent = new Intent(context, ContextualActivity.class); | 656 | Intent intent = new Intent(context, ContextualActivity.class); |
650 | intent.putExtra("ccms", item); | 657 | intent.putExtra("ccms", item); |
651 | context.startActivity(intent); | 658 | context.startActivity(intent); |
... | @@ -780,6 +787,12 @@ public class WarplyManagerHelper { | ... | @@ -780,6 +787,12 @@ public class WarplyManagerHelper { |
780 | String cpnUuid = campaignSettings.optString("couponset"); | 787 | String cpnUuid = campaignSettings.optString("couponset"); |
781 | for (Couponset cpns : WarplyManagerHelper.getCouponsets()) { | 788 | for (Couponset cpns : WarplyManagerHelper.getCouponsets()) { |
782 | if (cpns.getUuid().equals(cpnUuid)) { | 789 | if (cpns.getUuid().equals(cpnUuid)) { |
790 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
791 | + analyticsEvent.setEventName("loyalty_sdk_offer_selected"); | ||
792 | + analyticsEvent.setParameter("name", item.getTitle()); | ||
793 | + analyticsEvent.setParameter("type", "coupon"); | ||
794 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
795 | + | ||
783 | WarplyManager.getSingleCampaign(item.getSessionUUID()); | 796 | WarplyManager.getSingleCampaign(item.getSessionUUID()); |
784 | Intent intent = new Intent(context, CouponsetInfoActivity.class); | 797 | Intent intent = new Intent(context, CouponsetInfoActivity.class); |
785 | intent.putExtra("couponset", (Serializable) cpns); | 798 | intent.putExtra("couponset", (Serializable) cpns); |
... | @@ -808,6 +821,12 @@ public class WarplyManagerHelper { | ... | @@ -808,6 +821,12 @@ public class WarplyManagerHelper { |
808 | String cpnUuid = campaignSettings.optString("couponset"); | 821 | String cpnUuid = campaignSettings.optString("couponset"); |
809 | for (Couponset cpns : WarplyManagerHelper.getCouponsets()) { | 822 | for (Couponset cpns : WarplyManagerHelper.getCouponsets()) { |
810 | if (cpns.getUuid().equals(cpnUuid)) { | 823 | if (cpns.getUuid().equals(cpnUuid)) { |
824 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
825 | + analyticsEvent.setEventName("loyalty_sdk_offer_selected"); | ||
826 | + analyticsEvent.setParameter("name", item.getTitle()); | ||
827 | + analyticsEvent.setParameter("type", "coupon"); | ||
828 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
829 | + | ||
811 | WarplyManager.getSingleCampaign(item.getSessionUUID()); | 830 | WarplyManager.getSingleCampaign(item.getSessionUUID()); |
812 | Intent intent = new Intent(context, CouponsetInfoActivity.class); | 831 | Intent intent = new Intent(context, CouponsetInfoActivity.class); |
813 | intent.putExtra("couponset", (Serializable) cpns); | 832 | intent.putExtra("couponset", (Serializable) cpns); | ... | ... |
... | @@ -67,6 +67,7 @@ import java.util.concurrent.TimeUnit; | ... | @@ -67,6 +67,7 @@ import java.util.concurrent.TimeUnit; |
67 | import ly.warp.sdk.Warply; | 67 | import ly.warp.sdk.Warply; |
68 | import ly.warp.sdk.activities.WarpViewActivity; | 68 | import ly.warp.sdk.activities.WarpViewActivity; |
69 | import ly.warp.sdk.io.models.CouponEventModel; | 69 | import ly.warp.sdk.io.models.CouponEventModel; |
70 | +import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | ||
70 | import ly.warp.sdk.io.models.QuestionnaireEventModel; | 71 | import ly.warp.sdk.io.models.QuestionnaireEventModel; |
71 | import ly.warp.sdk.io.models.WarplyPacingCardEventModel; | 72 | import ly.warp.sdk.io.models.WarplyPacingCardEventModel; |
72 | import ly.warp.sdk.io.models.WarplyPacingEventModel; | 73 | import ly.warp.sdk.io.models.WarplyPacingEventModel; |
... | @@ -431,6 +432,10 @@ public class WarpView extends WebView { | ... | @@ -431,6 +432,10 @@ public class WarpView extends WebView { |
431 | EventBus.getDefault().post(new WarplyEventBusManager(pacingWidgetVisible)); | 432 | EventBus.getDefault().post(new WarplyEventBusManager(pacingWidgetVisible)); |
432 | } else if (parts[1].equals("steps") && parts[2].equals("shortcutEnabled")) { // This is for the pacing service | 433 | } else if (parts[1].equals("steps") && parts[2].equals("shortcutEnabled")) { // This is for the pacing service |
433 | if (!isMyServiceRunning(WarplyHealthService.class)) { | 434 | if (!isMyServiceRunning(WarplyHealthService.class)) { |
435 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
436 | + analyticsEvent.setEventName("loyalty_steps_activation"); | ||
437 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
438 | + | ||
434 | Intent stepsServiceIntent = new Intent(Warply.getWarplyContext(), WarplyHealthService.class); | 439 | Intent stepsServiceIntent = new Intent(Warply.getWarplyContext(), WarplyHealthService.class); |
435 | Warply.getWarplyContext().startService(stepsServiceIntent); | 440 | Warply.getWarplyContext().startService(stepsServiceIntent); |
436 | 441 | ... | ... |
-
Please register or login to post a comment