Collection of functions responsible for tracking an user's activity in an Eitri-App using TikTok.

Methods

  • Tracks Add To Cart event

    let modules = await Eitri.modules();
    await modules.tiktok.logAddToCartEvent({
    data: {
    content_type: "product",
    content_id: 123,
    description: "details about the product",
    currency: "BRL",
    value: 99.90
    },
    id: "PROD_123"
    })

    Parameters

    • param: { data: Record<string, any>; id?: string }

      Object describing the event.

      • data: Record<string, any>

        Object describing the event's data.

      • Optionalid?: string

        Content ID.

    Returns Promise<undefined>

  • Tracks Add To Wishlist event

    let modules = await Eitri.modules();
    await modules.tiktok.logAddToWishlistEvent({
    data: {
    content_type: "product",
    content_id: 123,
    description: "details about the product",
    currency: "BRL",
    value: 99.90
    },
    id: "PROD_123"
    })

    Parameters

    • param: { data: Record<string, any>; id?: string }

      Object describing the event.

      • data: Record<string, any>

        Object describing the event's data.

      • Optionalid?: string

        Content ID.

    Returns Promise<undefined>

  • Tracks Checkout event

    let modules = await Eitri.modules();
    await modules.tiktok.logCheckoutEvent({
    data: {
    content_type: "product",
    content_id: 123,
    quantity: 2,
    currency: "BRL",
    value: 99.90
    },
    id: "CART_456"
    })

    Parameters

    • param: { data: Record<string, any>; id?: string }

      Object describing the event.

      • data: Record<string, any>

        Object describing the event's data.

      • Optionalid?: string

        Content ID.

    Returns Promise<undefined>

  • Registers an event in TikTok

    let modules = await Eitri.modules();
    await modules.tiktok.logEvent(
    {
    eventName: "eitri_event",
    data: { page: "/Playground"},
    id: "123"
    }
    )

    Parameters

    • param: { data: Record<string, any>; eventName: string; id: string }

      Object describing the event.

      • data: Record<string, any>

        Object describing the event's data.

      • eventName: string

        Name of the event.

      • id: string

        Unique identifier for the event (e.g. content ID).

    Returns Promise<undefined>

  • Tracks Purchase event

    let modules = await Eitri.modules();
    await modules.tiktok.logPurchaseEvent({
    data: {
    content_type: "product",
    content_id: 123,
    description: "details about the product",
    currency: "BRL",
    value: 99.90
    },
    id: "ORDER_789"
    })

    Parameters

    • param: { data: Record<string, any>; id?: string }

      Object describing the event.

      • data: Record<string, any>

        Object describing the event's data.

      • Optionalid?: string

        Content ID.

    Returns Promise<undefined>

  • Tracks View Content event

    let modules = await Eitri.modules();
    await modules.tiktok.logViewContentEvent({
    data: {
    content_type: "product",
    content_id: 123,
    description: "details about the product",
    currency: "BRL",
    value: 99.90
    },
    id: "PROD_123"
    })

    Parameters

    • param: { data: Record<string, any>; id?: string }

      Object describing the event.

      • data: Record<string, any>

        Object describing the event's data.

      • Optionalid?: string

        Content ID.

    Returns Promise<undefined>