0

According to GitHub sample project and Tealium's documentation for Kotlin I created such TealiumHelper:

object TealiumHelper {
    fun init(application: Application) {
        val tealiumConfig = TealiumConfig(
            application,
            accountName = BuildConfig.TEALIUM_ACCOUNT_NAME,
            profileName = BuildConfig.TEALIUM_PROFILE_NAME,
            environment = BuildConfig.TEALIUM_ENVIRONMENT
        )
        
        // Display logs only for DEV
        Logger.Companion.logLevel = BuildConfig.TEALIUM_LOGLEVEL

        // Make it start working                        
        Tealium.create(BuildConfig.TEALIUM_INSTANCE, tealiumConfig)
    }

    fun trackEvent(name: String, data: Map<String, Any>? = null) {
        val eventDispatch = TealiumEvent(name, data)
        Tealium[BuildConfig.TEALIUM_INSTANCE]?.track(eventDispatch)
    }

    fun trackView(name: String, data: Map<String, Any>? = null) {
        val viewDispatch = TealiumView(name, data)
        Tealium[BuildConfig.TEALIUM_INSTANCE]?.track(viewDispatch)
    }
}

I get logs by Tealium so it should be working fine.

2021-05-17 14:28:56.694 22812-22894/xxx.xxx.xxx D/Tealium-1.2.2: Dispatch(fc5c0) - Ready - {tealium_event_type=view, tealium_event=XXX ...}

But after I call trackView or trackEvent, my events don't go to server.

There is also additional log infor which I don't know what does it mean. Documentation doesn't say much about it:

2021-05-17 14:28:59.352 22812-22894/xxx.xxx.xxx I/Tealium-1.2.2: Asset not found (tealium-settings.json)

How could I fix it? What does Asset not found mean?

deadfish
  • 11,996
  • 12
  • 87
  • 136

1 Answers1

1

@deadfish I manage the mobile team here at Tealium, so I can point you in the right direction. You can safely ignore the Asset Not Found log - this just indicates that no local settings file was found, so by default, the remote settings will be used. We'll look at addressing this to make the log message a little more helpful. There are a couple of things that might cause data not to be sent. Firstly, I can't see any Dispatchers specified in your TealiumConfig object. As specified in the docs, you need to add either the TagManagement or Collect dispatcher, which are the modules that send the data from the device. The Collect module sends data to the server-side platform (I think this is what you need), while the TagManagement module processes the data client-side using JavaScript. Please feel free to get in touch with our support team or contact us by raising an issue on our GitHub repo if you need further personalized support.

CPR
  • 753
  • 8
  • 19
  • OK, looks like it works now. I noticed that instead of view's name I am getting `tealium mobile webview` instead `my_name_screen` i.e. `settingsScreen`. Do I have to do something in code or Tealium dashboard? – deadfish May 18 '21 at 07:28
  • My problem might be more complicated than I thought. I have Tealium integrated with Oracle dashboard. When I call in my app `.trackView("splashScreen", null)`, it sends the event correctly but in Oracle's dashboard I see event with different name. Instead `splashScreen` I have `tealium mobile webview`. What could be cause of this behaviour? Do I have to add any rule for Tag Management? – deadfish May 18 '21 at 15:49
  • @deadfish This means you're using the Tag Management module, and I expect you have an analytics tag configured there, such as Google Analytics? To stop Google Analytics taking the document title as the page name, you need to configure a mapping in Tealium iQ to map your screen name to the screen name variable in the Google Analytics tag. I'd suggest contacting our support team if you're unsure how to do this. – CPR May 18 '21 at 15:50
  • OK, I see however I have only Firebase Crashlytics in my project. – deadfish May 18 '21 at 15:53
  • To create Tealium for Kotlin we call `.create({instance_name}, {config})` . For iOS there is not `instance_name`. What is default name for iOS instance? – deadfish May 19 '21 at 06:58
  • @deadfish there is no requirement to pass an instance name for iOS, but we generate one by default and store a reference to the instance in the TealiumInstanceManager singleton: https://docs.tealium.com/platforms/ios-swift/api/tealium-instance-manager/. The instance name is in the format account.profile.environment. – CPR May 19 '21 at 10:00
  • OK, so my instance name will be `myapp.myprofile.dev`. I am trying to do the same as iOS to be 1:1 but even that I still don't get correct view event. I started getting `Invalid JSON input: //` error. – deadfish May 19 '21 at 11:11
  • @deadfish I strongly recommend getting in touch with our support team who can give you personalized 1-1 support and review this on a call if necessary. You'll get a much better outcome and a quicker response there. Thanks! – CPR May 19 '21 at 13:50
  • 1
    I did. Thank you very much. There was missing parameter for Kotlin (`.tealiumview`) on your side. We had to map it with something else. – deadfish May 20 '21 at 09:12
  • I also noticed that Tealium is crashing when I run my app in Offline Mode - `FATAL EXCEPTION: DefaultDispatcher-worker-2`. I noticed that iOS had similar problem with this in 2017 but I didn't find any information for Kotlin. – deadfish May 21 '21 at 08:56
  • Does Tealium have any recommendation for such behaviours? – deadfish May 21 '21 at 09:46
  • @deadfish this is not expected behavior, so please speak to the support team and we can look into it. – CPR May 26 '21 at 14:09