Advanced Settings

Retargeting

Your app can send information to indigitall's servers to identify the actions and events that happen in it. This allows you to automate retargeting actions.

To register these events you have to call the sendCustomEvent method, passing a descriptive ID as a parameter (you can invent the one you like best) and set data you need on JSON object.

tiindigitall.sendCustomEvent({event: "YOUR_CUSTOM_EVENT", customData:{}, () => {
    // Do something in success function
},(error) => {
    // Do something in error function
});

Topics

Our SDK allows you to classify users into different customizable groups. This is very useful for:

  • Implement a preferences screen so that the user can choose the topics for which they want to receive notifications.
  • Label according to the navigation or actions that the user performs.
  • Segment communications according to whether the user has identified or is anonymous.
  • Segment based on language, culture, customer category, or based on any other criteria you need.

Remember that you must first define the groups you want to work with in the indigitall console
(Tools> Topics).

  • List groups

Use the topicsList method to get the list of groups that are configured in your indigitall project. The callback of this method receives as a parameter an array of Topics, which contains the information of all the available groups, as well as a flag that indicates whether the user is included in any of them.

tiindigitall.topicsList((topics) => {
  // Do something with topics in success function
}, (error) => {
  // Do something in error function
});
  • Manage subscription

To manage the device subscription to one or more groups, there are two methods: topicsSubscribe and topicsUnsubscribe.

Optionally, both receive a TopicsCallback object as the third parameter, which will return the list of all Topic in the project.

// topics is typeof String[]
tiindigitall.topicsSubscribe(topics, (topics) => {
  // Do something with topics in success function
}, (error) => {
  // Do something in error function
});

// topics is typeof String[]
tiindigitall.topicsUnsubscribe(topics, (topics) => {
  // Do something with topics in success function
}, (error) => {
  // Do something in error function
});

Collection of push data

In the event that you want to obtain the push object of type json to perform checks and / or when the user clicks on the notification and is with the action of open app. The device model would have this structure:

push = {
  id: "int", 
    appKey: "string",
    title: "string",
    body: "string",
    icon: "string",
    image: "string",
    gif: "string",
    video: "string",
    action: {
          topics: ["string"],
          destroy: "boolean",
          type: "app | url | call | market | share",
          app: "string",
          url: "string",
          call: "string",
          market: "string",
          share: "string"
            }
    buttons: [{
          label:"string",
          action: {
                topics: ["string"],
                destroy: "boolean",
                type: "app | url | call | market | share",
                app: "string",
                url: "string",
                call: "string",
                market: "string",
                share: "string"
                  }
              }]
    data: "string",
    layout: "Layout",
    securedData: "string"
};

We leave you this code that will help to obtain it:

tiindigitall.getPush(push => {
//DO SOMETHING
},(error)=>{
// Do something in error function
});