How to pass events in your native Wootric SDK installs

Learn about tracking events with the Wootric SDKs

Marín Alcaraz avatar
Written by Marín Alcaraz
Updated over a week ago

You can configure your sampling rules in the Targeted Sampling page inside Wootric Settings

When you install Wootric via our Segment integrations events are automatically passed to us and you can trigger surveys based on those. But what if you installed Wootric natively?

This article will guide you through the implementation process so you can get your surveys up and running!


  • Your account must be using Wootric’s Targeted Sampling

  • For JavaScript installations: SDK version 1.1.0 or newer. You can check your version by running WootricSurvey.version() in the browser’s console whenever your Wootric snipped is embedded.

  • For Android installations: version 0.17.0 or newer.

  • For iOS installations: version 2.15.0 or newer.


// You define a global variable to track your events

my_global_event_name = 'loaded_website';

// You define your WootricSettings variable at the beginning of the code

wootricSettings = {

account_token: 'NPS-YOURTOKEN',

email: '',

created_at: 1528416000,

properties: {

favorite_color: 'blue'


event_name: my_event


// You assign the event name when a given action happens

wootricSettings.event_name = 'on_purchase'

// You call Wootric whenever you want to check if the event you set might be eligible for a survey



NSString *accountToken = @"ACCOUNT_TOKEN";

[Wootric configureWithAccountToken:accountToken];

[Wootric setEndUserEmail:@""];

[Wootric setEndUserCreatedAt:@1528416000];

[Wootric setEndUserProperties:@{ @"favorite_color": @"blue"}];

[Wootric showSurveyInViewController:self event:@"on_purchase"];


Wootric wootric = Wootric.init(this, CLIENT_ID, ACCOUNT_TOKEN);



HashMap<String, String> properties = new HashMap();

properties.put("favorite_color", "blue");



Did this answer your question?