diff --git a/packages/marko-web-p1-events/components/track-scroll-depth/native-story.marko b/packages/marko-web-p1-events/components/track-scroll-depth/native-story.marko index 5250e679b..5bd508e70 100644 --- a/packages/marko-web-p1-events/components/track-scroll-depth/native-story.marko +++ b/packages/marko-web-p1-events/components/track-scroll-depth/native-story.marko @@ -8,8 +8,36 @@ $ const { } = input; $ const config = site.getAsObject("p1events"); $ const nxConfig = site.get("nativeX"); +$ const mindfulConfig = site.getAsObject("mindful"); - + + $ const { advertiser } = story; + $ const entity = { + id: story.id, + ns: `mindful.${mindfulConfig.namespace}.advertising-post`, + name: story.title, + props: { type: "advertising-post", published: get(story, "publishedAt") }, + ...(advertiser && advertiser.id && { + refs: { + advertiser: { + id: advertiser.id, + ns: `mindful.${mindfulConfig.namespace}.advertising-company`, + name: advertiser.name + } + } + }), + } + + + $ const { advertiser } = story; $ const entity = { id: story.id, @@ -29,4 +57,4 @@ $ const nxConfig = site.get("nativeX"); targetScrollDepths, } /> - +