Skip to content

Commit b692813

Browse files
committed
feat: fix instagram analytics
1 parent 078d473 commit b692813

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ export class InstagramProvider
755755
// Fetch media insights from Instagram Graph API
756756
const { data } = await (
757757
await this.fetch(
758-
`https://${type}/v21.0/${postId}/insights?metric=impressions,reach,saved,likes,comments,shares&access_token=${accessToken}`
758+
`https://${type}/v21.0/${postId}/insights?metric=views,reach,saved,likes,comments,shares&access_token=${accessToken}`
759759
)
760760
).json();
761761

@@ -772,8 +772,8 @@ export class InstagramProvider
772772
let label = '';
773773

774774
switch (metric.name) {
775-
case 'impressions':
776-
label = 'Impressions';
775+
case 'views':
776+
label = 'Views';
777777
break;
778778
case 'reach':
779779
label = 'Reach';

0 commit comments

Comments
 (0)