Skip to main content
All CollectionsShopify App
Sending Events to Mixpanel Using Google Tag Manager
Sending Events to Mixpanel Using Google Tag Manager

Learn how to send custom events to Mixpanel with GTM

Updated over a month ago

Overview

Learn how to send custom events to Mixpanel through Google Tag Manager (GTM). By integrating Mixpanel events into your GTM setup, you can easily track user interactions and analyze behavior without requiring manual code changes each time.

Assumptions

  • Mixpanel is already set up through Vendo.

  • Google Tag Manager is installed and configured on your website.

How It Works

  1. Event Capture: Events are first sent to the Web Pixel API.

  2. Enrichment & Forwarding: Vendo listens for these events, enriches them with additional data, and then forwards them to Mixpanel.

  3. User Identification: Each event is associated with the appropriate user profile in Mixpanel, ensuring accurate attribution and reporting.

Step-by-Step Instructions

  1. Create an HTML Tag in GTM:

    1. In your GTM workspace, create a new HTML tag.

    2. Add the event snippet (see examples).

    3. Configure the trigger so the tag fires on the desired events (e.g., page views, button clicks, or form submissions).

  2. Test Using the GTM Debugger:

    1. Preview your changes in GTM’s Preview Mode.

    2. Interact with your website to trigger the events you want to send.

    3. Check the debugger console to confirm that events are captured, enriched, and forwarded successfully.

  3. Publish Your GTM Changes:

    1. Once the events are firing and recorded correctly in Mixpanel, publish your GTM container changes.

    2. Your events will now be sent to Mixpanel automatically as users interact with your site.

If you have any questions or feedback feel free to contact us.

Did this answer your question?