Skip to content

Commit

Permalink
feat: Added poweredBy config for Google Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Jul 11, 2022
1 parent d71835f commit b0883f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/api/layers/host.layer.ts
Expand Up @@ -143,6 +143,7 @@ export class HostLayer {
disableGoogleAnalytics: this.options.disableGoogleAnalytics,
googleAnalyticsId: this.options.googleAnalyticsId,
linkPreviewApiServers: this.options.linkPreviewApiServers,
poweredBy: this.options.poweredBy,
};

await evaluateAndReturn(
Expand Down
7 changes: 7 additions & 0 deletions src/config/create-config.ts
Expand Up @@ -155,6 +155,12 @@ export interface CreateConfig {
* @default null
*/
googleAnalyticsId?: string | null;

/**
* Custom variable for Google Analytics
* @default 'WPPConnect'
*/
poweredBy?: string;
}

export const defaultOptions: CreateConfig = {
Expand All @@ -179,4 +185,5 @@ export const defaultOptions: CreateConfig = {
linkPreviewApiServers: null,
disableGoogleAnalytics: true,
googleAnalyticsId: null,
poweredBy: 'WPPConnect',
};

0 comments on commit b0883f3

Please sign in to comment.