How can we send custom properties with the mixpanel.track_pageview JS API? For example, this doesn't seem to work right now: mixpanel.track_pageview({"funnels": "funnel_3"}); but if I don't include the custom attributes track_pageview works.
Hi Golibe O., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
The mixpanel.track_pageview()
function does indeed support sending custom properties. However, the way you're trying to use it seems incorrect. The track_pageview
function does not take an object as an argument. Instead, you should use the mixpanel.track()
function to send custom properties with your events.Here's an example of how you can send a custom property with the "Page View" event:LBKSmixpanel.track("Page View", {"funnels": "funnel_3"});LBKS
In this example, "Page View" is the event name, and {"funnels": "funnel_3"}
is the properties object that you're sending along with the event.If you want to track page views automatically with custom properties, you might need to manually call mixpanel.track()
with your custom properties on every page load.For more information, you can refer to the Mixpanel JavaScript SDK documentation.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
⤵️ Hint: Mention @kapa.ai in the thread for follow-ups.