React-Native v2 not sending data

Bronze Contributor
Bronze Contributor

We are trying to upgrade our tealium lib on our react native project from v1 to v2.

Our usage has been quite simple in our react-native app with v1:

Tealium.initialize('ACCOUNT', 'PROFILE', 'ENV');

and for usage mostly

Tealium.trackEvent('EVENT_NAME'); // no extra data
We've updated our intialization to what is the minimum required:
let tealiumConfig = {
  account: 'ACCOUNT',
  profile: 'PROFILE',
  environment: 'ENV',
  dispatchers: [Dispatchers.Collect],
  collectors: [Collectors.AppData, Collectors.Connectivity],
Tealium.initialize(tealiumConfig, success => {
  console.log('tealium success:', success);
The callback return true, which signals we are on the right track.
When trying to send data we've also updated accordingly:
  let tealiumEvent = new TealiumEvent('EVENT_NAME', {}); //most of the times we don't send data so we leave an empty object as per TS requirement
Things look quite straightforward but we are simply not getting any events on the other side when we apply this upgrade. Could you provide more information or samples for the react native use case. Perhaps more details on the Collectors and Dispatchers for people coming from v1 where they weren't setup whatsoever but now they are required. Are there any other items to setup?
As a extra curiosity. We don't seem to get anything out of the `loglevel` TealiumConfig when set in any of the different values ( / dev / prod). The React Native debugger doesn't show anything no matter what value is used. The documentation does not go into detail of how to benefit from this field either.



React-Native v2 not sending data

Tealium Employee

Hi @Joell 

Were you using v1 previously - Was everything working fine there if so?

If you were not, and this is the first time you are using this profile with mobile, it would be worth checking your mobile publish settings.


Judging by the dispatchers specified, you are looking to send this data directly to EventStream - So you should make sure that "Tealium Collect" is enabled within the mobile publish settings.

You could also look at getting a copy of the example app from out GitHub, and simply updating the app to use your own account/profile - The example app should have everything working, so you'll be able to use this to help narrow down the cause of the issue

If the mobile publish setting is already enabled, or you are still having trouble, it may be worth raising a ticket with the support team, where you can specify your account and profile - and someone will be able to look at this in more depth

React-Native v2 not sending data

Bronze Contributor
Bronze Contributor

Hi, thank you for your reply.

Indeed we are migrating from v1 to v2 as stated on the message. As such, we are confident the Tealium mobile config is correct since we've been working with it for a while now. The issue is specifically related to the new initialization config.

We've managed to get it working by using all the Dispatchers and Collectors. They question came up because if we don't use all of them, then no data is being sent. We are still curious on the relationship between the several Dispatchers and Collectors and Tealium being able to send any data. In other words, the question, or request, is to elaborate in your docs what is each Dispatcher/Collector doing and to make it clear when is each of them required.

We also weren't able to see any logging, we are wondering if the logLevel config is represented in the local level, via logs in react native debugger for example, or is it something we would only see on the server side? The documentation does not explicitly mention this.