Skip to main content
Contributor I
October 21, 2025
Solved

React Native SDK Doesn't Seem to Do Anything

  • October 21, 2025
  • 2 replies
  • 149 views

Hi All,

 

I am trying to use the React Native SDK in my app, primarily to register push tokens to a user’s Klaviyo profile. I have been unable to achieve this.  The code runs without error, but no tokens ever show up on the user’s profile.

As a test, I also tried using the SDK to generate a custom event. This also did not seem to work (it did not show up on the user’s profile).

Here is the code I am using:
 

import { Klaviyo } from 'klaviyo-react-native-sdk';
Klaviyo.initialize(MY_SITE_KEY);
if (userData.klaviyoID) {
Klaviyo.setProfile({
id: userData.klaviyoID,
});
} else if (userData.email) {
Klaviyo.setEmail(userData.email);
Klaviyo.setExternalId(userData.uid);
}
// Neither of the above approaches works.
...
Klaviyo.setPushToken(TOKEN_RECEIVED_FROM_FCM);
Klaviyo.createEvent({
  name: 'My Custom Event',
});

As a temporary workaround, I have been calling the Klaviyo REST API to register push tokens, which works fine. But because using the SDK directly to register push tokens or create events doesn’t work, I am concerned that other functionality which relies on the SDK (e.g. tracking notification clicks) is also not going to work.

There is code not shown in the excerpt above that gets the token from FCM. It knows to get an APNs token if the app is running on iOS and an FCM token if it’s running on Android.  But that shouldn’t matter.  In theory, you should be able to pass any string to the setPushToken method, and it should show up in the user’s profile.  That’s how the Klaviyo REST API behaves.

Is there anything obvious that I’m doing wrong?  I have been working at this for a couple of days, and I’m pretty much stumped.

    Best answer by Byrne C

    Hi ​@TheRealMikeD,

    Commenting on this to keep it visible in the community! If any of our champions see this and have had similar experiences, we’d love your insight! 

    2 replies

    Byrne C
    Community Manager
    Byrne CAnswer
    Community Manager
    October 30, 2025

    Hi ​@TheRealMikeD,

    Commenting on this to keep it visible in the community! If any of our champions see this and have had similar experiences, we’d love your insight! 

    Contributor I
    November 19, 2025

    We see the same issues. We will register the tokens manually, but like TheRealMikeD said, it is not a solid workaround. We use the Expo plugin too, and it shows the same problems.