new(whatsapp.gblib): FB Analytics.
This commit is contained in:
parent
8a8884da64
commit
b8a9740792
1 changed files with 2 additions and 2 deletions
|
@ -1574,7 +1574,7 @@ private async sendButtonList(to: string, buttons: string[]) {
|
||||||
if (marketingTemplates.length === 0) {
|
if (marketingTemplates.length === 0) {
|
||||||
return 'No marketing templates found.';
|
return 'No marketing templates found.';
|
||||||
}
|
}
|
||||||
|
console.log(GBUtil.toYAML(marketingTemplates));
|
||||||
const latestTemplate = marketingTemplates[0];
|
const latestTemplate = marketingTemplates[0];
|
||||||
const templateId = latestTemplate.id;
|
const templateId = latestTemplate.id;
|
||||||
|
|
||||||
|
@ -1592,7 +1592,7 @@ private async sendButtonList(to: string, buttons: string[]) {
|
||||||
if (!analyticsResponse.ok) {
|
if (!analyticsResponse.ok) {
|
||||||
throw new Error(analyticsData.error.message);
|
throw new Error(analyticsData.error.message);
|
||||||
}
|
}
|
||||||
|
console.log(GBUtil.toYAML(analyticsData));
|
||||||
const dataPoints = analyticsData.data[0]?.data_points || [];
|
const dataPoints = analyticsData.data[0]?.data_points || [];
|
||||||
if (dataPoints.length === 0) {
|
if (dataPoints.length === 0) {
|
||||||
return 'No analytics data available for the specified template.';
|
return 'No analytics data available for the specified template.';
|
||||||
|
|
Loading…
Add table
Reference in a new issue