Marigold Rebrand Migration Guide

How to migrate to the rebranded SDKs

This documentation will walk you through the process of updating your SDK versions to the rebranded 'Marigold' SDK. This mostly involves updating all references of 'SailthruMobile' into 'Marigold', however there are some finer points that you need to be aware of. This guide is here to help you smoothly transition to the updated 'Marigold' framework.


Framework updates

The frameworks have been renamed from SailthruMobile.framework to Marigold.framework and SailthruMobileExtension.framework to MarigoldExtension.framework.


If you are using Cocoapods you will need to update to the new Pods:

# Previously
pod 'SailthruMobile'
pod 'SailthruMobile/Extension'

# Now
pod 'Marigold'
pod 'Marigold/Extension'


If you are using Carthage the Github location will remain the same but you will need to change the linked frameworks to Marigold.framework and MarigoldExtension.framework instead of the old 'SailthruMobile' versions.

SailthruMobile to Marigold

The main class has been renamed from SailthruMobile to Marigold. So for instance when calling startEngine:

// Previously
[[SailthruMobile new] startEngine:@"Your_app_key"];

// Now
[[Marigold new] startEngine:@"Your_app_key"];
// Previously

// Now


All other classes have been renamed but will otherwise function in the same way as before:



// Previously
STMAttributes *attributes = [[STMAttributes alloc] init];

STMPurchaseItem *item = [[STMPurchaseItem alloc] initWithQuantity:2 title:@"Made Up Object" price:1234 itemId:@"2345" itemUrl:itemUrl];

STMPurchase *purchase = [[STMPurchase alloc] initWithPurchaseItems:@[ item ]];

// Now
MARAttributes *attributes = [[MARAttributes alloc] init];

MARPurchaseItem *item = [[MARPurchaseItem alloc] initWithQuantity:2 title:@"Made Up Object" price:1234 itemId:@"2345" itemUrl:itemUrl];

MARPurchase *purchase = [[MARPurchase alloc] initWithPurchaseItems:@[ item ]];
// Previously
let attributes = CarnivalAttributes()

let item = CarnivalPurchaseItem(quantity: 2, title: "Made Up Object", price: 1234, itemId: "2345", itemUrl: url!)

// create purchase
let purchase = CarnivalPurchase(purchaseItems: [ item ])

// Now
let attributes = STMAttributes()

let item = STMPurchaseItem(quantity: 2, title: "Made Up Object", price: 1234, itemId: "2345", itemUrl: url!)

// create purchase
let purchase = STMPurchase(purchaseItems: [ item ])

Extension SDK

The Extension SDK has followed the same rebranding pattern, the main class has changed from SailthruMobileExtension to MarigoldExtension. The other classes have changed to the 'MAR' prefix.

// Previously
SailthruMobileExtension *extension = [[SailthruMobileExtension alloc] initWithAppKey:@"Your_app_key" groupName:@""];

// Now
MarigoldExtension *extension = [[MarigoldExtension alloc] initWithAppKey:@"Your_app_key" groupName:@""];
// Previously
let extension = SailthruMobileExtension(appKey: "Your_app_key", groupName: "")

// Now
let extension = MarigoldExtension(appKey: "Your_app_key", groupName: "")


Package Change

The Android SDK has been repackaged from to com.marigold.sdk. In your build.gradle file it will look like this:

// Previously
implementation ''

// Now
implementation 'com.marigold.sdk:marigold:10.1.0'

The Maven url will remain the same. Some of the classes have also been separated out into sub-packages. Below are the mappings for the package changes per class.








(new class)com.marigold.sdk.EngageBySailthru
(new class)com.marigold.sdk.EngageBySailthruExtensions

SailthruMobile to Marigold

The main class in the Android SDK has been renamed from SailthruMobile to Marigold. It has also been converted to using instance methods rather than static methods:

// Previously
new SailthruMobile().startEngine("Your_app_key");

// Now
new Marigold().startEngine("Your_app_key");
// Previously

// Now

Any resources named 'st_*' have now had 'st_*' prefix removed.

React Native

The React Native rebrand is currently in progress - this guide will be updated once the work is complete.

All SDKs


The EngageBySailthru class has been introduced to all the SDKs to facilitate a clear separation of logic between the core Marigold SDK functionality and the Sailthru only applications. This class is designed to house methods specific to Sailthru apps, providing a more organized and focused approach to SDK usage.

The EngageBySailthru class constructor includes a check for the app type. If the app type is determined to be non-Sailthru, an error will be thrown. This ensures that developers are aware of and prevented from using functionality that is not applicable to their specific app type.

The EngageBySailthru class includes methods that are specific to Sailthru applications. Developers should utilize these methods for Sailthru-related functionality. Here are the following methods moved from the Marigold class to EngageBySailthru.

  • trackPageview
  • trackImpression
  • trackClick
  • setUserEmail
  • setUserId
  • logEvent
  • setProfileVars
  • getProfileVars
  • handleSailthruLink
  • logPurchase
  • logAbandonedCart
  • setAttributes (deprecated)
  • removeAttribute (deprecated)
  • clearAttributes (deprecated) -> This has been split out from the clearDevice method in the Marigold class

The methods marked as deprecated should be removed or replaced with setProfileVars as soon as possible as they will be removed in a future release.