Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank.
Builder content link
Builder public api key
c3e3257ff5594facbf478a68d37f766d
What are you trying to accomplish
Integrate Page Field content into a databound element. Specifically, I’ve added a screenName Page Field for my Insights team to use to track pages by a different name than the Title. I’d like to be able to bind that screenName field to a property on a custom component as seen below:
Effectively, I’d like that Analytics Event Key to be ${screenName}_Continue, but it doesn’t appear that Page Fields are accessible in state. Are Page Fields exposed anywhere in the JS API?
Code stack you are integrating Builder with
NextJS
@nicke920 Unfortunately, that’s not really what I’m trying to do. I’m trying to get access to the Page Fields in the Builder data binding directly, rather than having to write custom code.
The problem is that the component I’m capturing the Analytics Event Key on is relatively disconnected from the page model, so I can’t easily map the screenName Page Field data to the onClick event in the component itself where I’m handling the Analytics Event Key property.
Essentially, I’m trying to make it where my Insights team only has to set that screenName value once and it just carries through to children on the page.
My problem is caused by the fact I’m using import RenderContent from “@builder.io/sdk-react” . It seems by using this component then context isn’t set up. I’ll open a new topic
Is this still the case? context.builderContent is undefined in my builder instance?
No matter what I try, I can’t seem to access the page fields for binding.
I have Builder Integrated with a Qwik app. @nicke920