TikTok module
Identifier
Section titled “Identifier”Enum: AffiseModules.TikTok (Runtime/Modules/AffiseModules.cs:7).
Purpose
Section titled “Purpose”Send TikTok event data to Affise.
C# class
Section titled “C# class”public class TikTokModule : AffiseModule, IAffiseTikTokApiNamespace: AffiseAttributionLib.Module.TikTok. Declared at Runtime/Module/TikTok/TikTokModule.cs:9.
Submodule API surface (accessed via Affise.Module.TikTok):
public interface IAffiseTikTokApi : IAffiseModuleApi—Runtime/Module/TikTok/IAffiseTikTokApi.cs:7public interface IAffiseModuleTikTokApi : IAffiseTikTokApi, IAffiseHasModule—Runtime/Module/TikTok/IAffiseModuleTikTokApi.cs:5
Method signature:
SendEvent<T>(string? eventName, Dictionary<string, T>? properties, string? eventId)Declared at Runtime/Module/TikTok/IAffiseTikTokApi.cs / Runtime/Module/TikTok/AffiseTikTok.cs:10.
Platform notes
Section titled “Platform notes”var tiktokEvent = new TikTokAddToCartEvent("eventID");tiktokEvent.SetDescription("Description of the product");tiktokEvent.SetCurrency(TTCurrency.TTCurrencyUSD);tiktokEvent.SetValue(4.99);tiktokEvent.SetContentType("Type of the product");tiktokEvent.SetContentId("ABC");
var eventContent = new TikTokContentParams();eventContent.price = 4.99;eventContent.quantity = 1;eventContent.brand = "Brand of the product";eventContent.contentName = "Name of the product";TikTokContentParams[] contents = {eventContent};
tiktokEvent.SetContents(contents);
TikTokBusinessSDK.TrackTTEvent(cartEvent);
var eventName = tiktokEvent.EventParams["eventName"];var eventId = tiktokEvent.EventParams["eventId"];var jsonString = tiktokEvent.EventParams["properties"];var properties = Utils.JsonToDictionary(jsonString);Affise.Module.TikTok.SendEvent(eventName, properties, eventId);Helper Utils.JsonToDictionary(string?) is declared at Runtime/Utils/Utils.cs:11.
Module presence check
Section titled “Module presence check”Affise.Module.TikTok.HasModule();