The Tealium BB10 Tagger library provides you with the means to tag your Blackberry applications using Tealium's Tag Management solution.

This framework provides:

  • Integration with analytics solutions via Tealium iQ
  • View tracking
  • Event tracking
  • Default and custom tracking data assignments - use our prebuilt set of variables or specify your own to pass along with tracking calls
  • Offline caching of trackable activity
  • Simple setup and remote configuration

Pre-requisites

Before you begin, you will need:

  • Access to github repository resources - your Account Manager can provide this
  • A Tealium iQ account
  • Your Tealium iQ account ID
  • The Tealium iQ profile name you will associate with your mobile app(s)
  • The Tealium iQ publish environment you will use
    • prod
    • qa
    • dev
    • any custom environment you specify
  • Blackberry's native IDE, QNX Momentics 10.1.10+ is recommended

Repo Contents

Below are the folders available on github:

  • bb10-tagger - This folder contains all files and references necessary to run the Tealium BB10 Tagger library in your app.
  • bbto-tagger_apptest - This folder contains a sample app for reference.
  • LICENSE - This folder is empty and can be ignored.
  • README - This file contains instructions for installing and implementing the Tealium BB10 Tagger library and corresponds to this article.

Installing Tealium's Blackberry Library

To install the Tealium BB10 Tagger library into your app:

  1. From the bb10_tagger/src folder, import the following files into your project's src folder:
    • tealiumtagger.cpp
    • tealiumtagger.h

    2_BB10_Import_01.png

    2_BB10_Import_02.png

    1_BB10_Files.png

    2_BB10_Import_03.png

  2. Add the following code to your .pro file:
        ```c++
        #ADDED BY TEALIUM
        LIBS += -lbbdata
        LIBS += -lbbplatform
        LIBS += -lbb
        ```
        3_BB10_PROFile_01.png
  3. Copy the config.xml file into your project.

    4_BB10_Config_01.png

  4. Initialize the library by adding the following line of code into your app's .cpp file (Not your main .cpp file!):

    ```c++ TealiumTagger *TealiumTaggerObj = new TealiumTagger(bb::cascades::Application::instance(), "yourAccountName", "yourProfile", "yourTargetEnvironment"); ```

How to Use

The BB10 Tagger library dispatches a view, event, or custom call depending on which of the below methods you use. By default, view calls become screen_title data sources in Tealium IQ, and event calls become link_id data sources. With any of these calls, you can also pass in a dictionary as an argument. List that dictionary's keys as data sources in Tealium iQ to map to whichever vendor tag you wish.

View Tracking

```c++
    void TealiumTagger::trackScreenViewed(QString viewName){

    void TealiumTagger::trackScreenViewed(QString viewName, Map variables){
```

For example:

```c++
    
    // Simple view call
    tealiumtagger->trackScreenViewed("myViewName1");
    
    // Advanced view call
    QMap customData;
    customData.insert("myDataSource1","myValue1");
    customData.insert("myDataSource2", "myValue2");
    tealiumtagger->trackScreenViewed("myViewName2", customData);

```

Custom Item Click Tracking

You can track any action or event with the following methods:

 ```c++
    void TealiumTagger::trackItemClicked(QString itemName)

    void TealiumTagger::trackItemClicked(QString itemName, Map variables){
```

For example:

```c++
  
  // Simple action call
  tealiumtagger->trackItemClicked("myStringId1");

  // Advanced action call
  QMap customData;
    customData.insert("myDataSource1","myValue1");
    customData.insert("myDataSource2", "myValue2");
    tealiumtagger->trackItemClicked("myStringId2", customData);

```

Default Data Sources

The following variables are automatically provided by the Tealium BB10 Tagger library. You must list them as data sources in Tealium iQ then map them to your analytics solution(s) of choice.

  • app_id

    A composite of app_name & app_version (e.g. myApp 1.0)

  • app_name

    Name of the app

  • app_version

    Your app's version number

  • link_id

    String value id from trackItemClicked method's first argument

  • os_version

    Version of the OS (e.g. 10.1.0)

  • screen_title

    Page/View name

  • pkg_author

    The package's author

  • pkg_name

    The package's codename

  • pkg_version

    The package's version

  • platform

    Platform (i.e. bb10)

  • platform+version

    Composite of platform + os_version (bb10 10.1)

BB_Data_Sources.png

Troubleshooting

Below are common issues and their possible solutions:

Problem: The library doesn't appear to be working when I have printf() or fprintf() statements in my code.

Solution: There is an issue with Momentics 10.1.0 where an fprintf() statement will quietly disable the BB10 Tagger library and no message will print to the console. No warning in the IDE will appear in either release or debug mode. Remove or comment out all printf() or fprintf statements. qDebug() is the only logging method recommended.

Public