Define some global configurations

Example

// Global variable before injection
WPPConfig = {
deviceName: 'WPPConnect',
liveLocationLimit: 10,
disableGoogleAnalytics: false,
googleAnalyticsId: 'G-XXXXXXXXXX',
sendStatusToDevice: true
};
interface Config {
    deviceName: string | false;
    disableGoogleAnalytics: boolean;
    googleAnalyticsId: string;
    googleAnalyticsUserProperty: {
        [key: string]: string | number | boolean;
    };
    linkPreviewApiServers: string[];
    liveLocationLimit: number;
    poweredBy: string;
    sendStatusToDevice: boolean;
    syncAllStatus: boolean;
    [key: string | symbol]: any;
}

Indexable

[key: string | symbol]: any

Properties

deviceName: string | false

Set the device name connected, false to disable

Default

'WPPConnect'
disableGoogleAnalytics: boolean

Disable Google Analytics tracking

googleAnalyticsId: string

Google Analytics Id

googleAnalyticsUserProperty: {
    [key: string]: string | number | boolean;
}

Google Analytics Id

Type declaration

  • [key: string]: string | number | boolean
linkPreviewApiServers: string[]

Link Preview API servers

liveLocationLimit: number

Number of last chats to check live location after a page reload

poweredBy: string

Project name for google analytics

sendStatusToDevice: boolean

Send the status to your device, set it to false to avoid WhatsApp crashing

Default

false
syncAllStatus: boolean

Option to disable status sync

Default

false