Mixpanel Community Icon

Adding Event Properties to GTM Autocapture Optional Parameters

·
·

I am using GTM and Autocapture - can I add Event Properties to the Optional Paramaters in the tag? Or is this not possible with Autocapture?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi Sebastian P., 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

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Yes, you can add event properties to Autocapture events when using Google Tag Manager (GTM). While Autocapture automatically collects predefined events like page views, clicks, and form interactions, you can still enhance these events with custom properties.When using Mixpanel's JavaScript SDK through GTM, you can configure the Autocapture settings and add custom properties. The knowledge sources don't specifically mention GTM configuration with Autocapture, but since GTM is essentially implementing the JavaScript SDK, you can follow the same principles for adding properties to events.For Autocapture events, you would need to: 1. Set up your Mixpanel tag in GTM with Autocapture enabled 2. Add your custom properties through the GTM interfaceThis approach gives you the benefit of Autocapture's automatic event collection while still allowing you to add business-specific context through custom properties.If you need more specific guidance on implementing this with GTM, the knowledge sources don't provide detailed information about the GTM-specific implementation. You might want to check Mixpanel's documentation on GTM integration or contact Mixpanel support for more specific instructions.I hope this helps! Let me know if you have any other questions about Mixpanel's Autocapture functionality.

    kapa.ai is still learning and improving, please let me know how I did by reacting below.

    ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.

  • Avatar of Sebastian P.
    Sebastian P.
    ·
    ·

    My properties arent showing up in the "your properties" tab in the event feed

  • Avatar of Sebastian P.
    Sebastian P.
    ·
    ·

    kapa.ai My properties arent showing up in the "your properties" tab in the event feed

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Let me check the knowledge base for you again. One moment! 📚

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    If your custom properties aren't showing up in the "Your Properties" tab in the Mixpanel event feed, there are several potential reasons for this issue: 1. Hidden Properties: Your properties might be hidden in Lexicon. Project Owners and Admins can hide event properties in your Mixpanel project through Lexicon. Check if your properties have been hidden there.2. Inactive Properties: Mixpanel hides properties that haven't been sent to your project in the last 28 days from dropdown menus. As mentioned in the documentation: "Event properties and property values that have not been sent to your project in the last 28 days will also be hidden from dropdowns" Debugging: Validate your data and troubleshoot your implementation.3. Implementation Issues: There might be issues with how you're adding the properties to your Autocapture events. Make sure you're correctly configuring the properties according to your implementation method.4. Property Naming: Mixpanel is case-sensitive, so ensure your property names match exactly what you expect to see.To troubleshoot this issue: 1. Use the Events view to search for your specific events and check if the properties are actually being sent. 2. Expand an event by clicking the "> " symbol to inspect all properties. 3. Toggle between "Your Properties" and "Mixpanel Properties" tabs to see if your custom properties are being categorized correctly. 4. Check if your properties appear in the JSON mode, which shows the complete JSON object Mixpanel received.If you're using GTM with Autocapture as mentioned previously, verify that your property mappings in GTM are correctly set up and that the events are firing as expected.If you've confirmed the properties are being sent but still don't see them in the UI, you might need to fire a single instance of that property again to make it resurface in the UI.Let me know if you need more specific troubleshooting steps based on your implementation method.I'm an AI assistant called kapa.ai specialized in answering questions about Mixpanel, a user analytics platform that helps companies track and analyze how users interact with web and mobile applications. Mixpanel focuses on tracking events (user actions), associating them with specific users, and analyzing these interactions through properties (attributes). The platform offers interactive reports including funnel analysis, retention metrics, cohort analysis, and session replay. Mixpanel provides SDKs for JavaScript, iOS, Android and other platforms, with both developer implementation options and low-code solutions, available in free and paid tiers.

    kapa.ai is still learning and improving, please let me know how I did by reacting below.

    ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.

  • Avatar of Sebastian P.
    Sebastian P.
    ·
    ·

    kapa.ai I am pushing them to the datalayer then fetching them as variables - i assume the autocapture event is being sent prior to the data being pushed into the DL

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Let me check the knowledge base for you again. One moment! 📚

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    You're right - it sounds like a timing issue where the Autocapture event is being sent before your custom properties are available in the data layer.When using Google Tag Manager with Mixpanel Autocapture, the automatic events (like page views and clicks) are captured immediately when they occur, but your custom properties might not be pushed to the data layer until after these events have already fired.Here are some potential solutions: 1. Adjust the trigger timing: Configure your Mixpanel tag to fire after your data layer variables are populated. You might need to create a custom trigger that fires only after your data layer push is complete.2. Use a separate tracking approach for these events: Instead of relying on Autocapture for events that need custom properties from the data layer, you could create separate Mixpanel "track" events in GTM that fire after your data layer is populated.3. Implement a data layer ready check: You could modify your implementation to ensure the data layer is populated before Autocapture initializes.When working with GTM and Mixpanel, you need to be careful about the sequence of operations. The Google Tag Manager integration documentation explains how the template works, but doesn't specifically address this timing issue with Autocapture.For debugging, I recommend using the Events view to inspect the raw event data and confirm whether your properties are being included at all. This will help determine if it's truly a timing issue or if there's another problem with how the properties are being passed.Let me know if you need more specific guidance on implementing any of these solutions!

    kapa.ai is still learning and improving, please let me know how I did by reacting below.

    ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.