klaviyo/klaviyo-swift-sdk

`.ViewedProduct` event does not show up as 'Viewed Product' in dashboard

Closed this issue · 9 comments

Description

When sending the .ViewedProduct event, it shows up in the dashboard as a new duplicated '$viewed_product' event instead of the canonical 'Viewed Product' event. I assume this is the case for other events as well, though I'll check more soon. I'll also try out version 2.3.0 since it was just released.

This is obviously pretty bad, since it bifurcates analytics data and muddies up one's whole dashboard setup.

Checklist

  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.

Expected behavior

Events sent from the iOS SDK appear with normalized names like 'Viewed Product' in the dashboard so that they integrate with the events from other surfaces.

Actual behavior

Events sent from the iOS SDK appear as dollar sign-prefixed snake case names like $viewed_product in the dashboard.

Steps to reproduce

  1. Send a .ViewedProduct event from the iOS SDK.
  2. Go to your Klaviyo profile event history to see the event it sent

The Klaviyo Swift SDK version information

2.2.1

Destination operating system

iOS 17

Xcode version information

15

Swift Compiler version information

No response

I notice Android has this same behavior, so maybe it is intentional for some reason.

Hey there! Sorry for not getting back to you yesterday. We are looking into this and will get back to you soon.

No worries. Here are some dashboard screenshots that I forgot to include:

This is how the event from mobile shows up:
Screenshot 2023-12-06 at 1 25 52 PM

And here is how it differs from the same one that comes from web frontend (a Shopify website in my case):
Screenshot 2023-12-06 at 1 26 11 PM

As a workaround for now do you mind using the Custom Event option for now with the correct event name. We will likely issue an SDK update soon with fixes for this and the added to cart event you reported. Sorry for the inconvenience!

Thanks for the reply. No problem!

I'm just trying to figure the system out still and how it all interconnects. So your guidance alone is super helpful.

This issue is stale due to inactivity. Please let us know if you are still encountering issues, otherwise this issue will automatically close in 10 days.

This issue has seen no updates in the past 14 days and will now be closed. Please open a new issue if you wish to report an update.

An update: we had an internal mixup about naming conventions, and will be rolling out a fix to both SDKs that will correct some event names. We will close this once the release is available. In the interim, the workaround is as Noah said to use custom event name with the properly formatted event name.

Hello again, we are rolling out a two-phased fix to this problem in both SDKs. There will be a minor release, 2.5.0 for swift and 1.4.0 for android, to introduce new enums and deprecate the legacy ones. Then a major release to get rid of the erroneous ones event metric names. For anyone wishing to continue to use the old names, you can still use a Custom enum and specify any string you like.

Swift SDK:
#138
#139

Android SDK:
klaviyo/klaviyo-android-sdk#107
klaviyo/klaviyo-android-sdk#109