Skip to content

Intelipoint/intelipoint-refiner-flutter-sdk

Repository files navigation


Logo Logo

Intelipoint Refiner SDK

Init Refiner with the projectId

RefinerSdk.initRefiner(projectId: 'YOUR-PROJECT-ID')

Identify the user with its corresponding ID and UserTraits

final refinerUser = RefinerUser(userId: userInfo.username, userTraits: userTraitsJson);
RefinerPackage.identifyUser(user: refinerUser);

Track event

RefinerSdk.trackEvent(eventName: 'eventName')

Track screen (not supported on Web)

RefinerSdk.trackScreen(screenName: 'screenName')

Reset user

RefinerSdk.resetUser()

Required on Web:

Add this script to your index.html inside head tag:

<script type="text/javascript">
  function identifyUser(params) {
    _refiner('identifyUser', params);
    (function () {
      var a = document.createElement("script");
      a.type = "text/javascript";
      a.async = !0;
      a.src = "https://js.refiner.io/v001/client.js";
      var b = document.getElementsByTagName("script")[0];
      b.parentNode.insertBefore(a, b)
    })();
  }

  window._refinerQueue = window._refinerQueue || [];

  function _refiner() { _refinerQueue.push(arguments); }

  function initRefiner(projectId) {
    _refiner('setProject', projectId);
  }

  function trackEvent(eventName) {
    _refiner('trackEvent', eventName);
  }
  
  function resetUser() {
    _refiner('resetUser');
  }
</script>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published