Collection of functions responsible for tracking user activity in an Eitri-App using Netcore Smartech SDK.

Netcore Smartech is a marketing and engagement platform that provides push notifications, event tracking, and user identification capabilities.

Requirements: This feature must be enabled in the Eitri Shopping App native configuration by setting netcoreAppId in the app configuration file.

Methods

  • Logs an event with Netcore Smartech, where each parameter of the event is defined as a key-value pair within the data object.

    Example:

    const modules = await Eitri.modules();
    const logEvent = modules?.netcore?.logEvent;
    if (!logEvent) return;

    await logEvent({
    eventName: "product_view",
    data: {
    product_id: "12345",
    category: "electronics",
    price: 99.99
    }
    })

    Parameters

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

      Object describing the event.

      • data: Record<string, any>

        Object describing the event's data.

      • eventName: string

        Name of the event.

    Returns Promise<undefined>

  • Sets user consent preferences for Netcore Smartech.

    Only the fields provided in the parameter object will be updated. Omitted fields will NOT be modified, allowing partial updates.

    Example:

    const modules = await Eitri.modules();
    const setUserOptins = modules?.netcore?.setUserOptins;
    if (!setUserOptins) return;

    // Set multiple opt-ins at once
    await setUserOptins({
    push: true,
    tracking: true
    })

    // Or opt-out of tracking only (GDPR/LGPD)
    await setUserOptins({ tracking: false })

    Parameters

    • optins: NetcoreUserOptins

      Object containing consent preferences. Only provided fields will be updated.

    Returns Promise<undefined>