From 119137a7acbe3330732ad0b4cacb003c30dc71d6 Mon Sep 17 00:00:00 2001 From: Brian Miller Date: Tue, 14 Feb 2023 11:24:44 -0600 Subject: [PATCH] Add content.labels to content context Add content labels to the content.label context being pushed to gtm --- packages/marko-web-gtm/components/context/content.marko | 1 + packages/marko-web-gtm/context/content.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/marko-web-gtm/components/context/content.marko b/packages/marko-web-gtm/components/context/content.marko index 9487f6cf8..7ca04e232 100644 --- a/packages/marko-web-gtm/components/context/content.marko +++ b/packages/marko-web-gtm/components/context/content.marko @@ -11,6 +11,7 @@ fragment ContentContextFragment on Content { id type name + labels siteContext { path } diff --git a/packages/marko-web-gtm/context/content.js b/packages/marko-web-gtm/context/content.js index c7b359cb2..be99f3107 100644 --- a/packages/marko-web-gtm/context/content.js +++ b/packages/marko-web-gtm/context/content.js @@ -31,6 +31,7 @@ module.exports = ({ obj, req }) => { type: content.type, name: content.name, published: content.published ? new Date(content.published).toISOString() : undefined, + labels: getAsArray(content, 'labels'), }, created_by: { id: createdBy.id,