[Week 20] Learning Mixpanel: Sending Ad Data into Mixpanel

[Week 20] Learning Mixpanel: Sending Ad Data into Mixpanel

Introduction

Welcome to Week 20 of Learning Mixpanel. I’m Ansh, a Mixpanel Certified Partner. I’ve had the privilege of working with 60+ startups, helping them set up their analytics infrastructure and gain actionable insights using Mixpanel.

Curious about my work? Check out my website for case studies, testimonials, and more details about what I do.


Tired of Mixpanel data going wrong - events missing, properties breaking, or random spikes?

Pravix makes it simple to detect these issues and keep your data clean.

Today, I’m going to talk about how to send Ad data to Mixpanel.

Let’s get into it


If your preferred consumption is audio visual - access the video on Youtube

Mixpanel allows you to integrate ad data, so you can manage both product and marketing analytics within the same platform. This enables you to analyze campaign performance and build metrics like ROI and ROAS directly in Mixpanel.

Matching Client-Side Properties:

If you’re using Mixpanel’s client-side SDK to track user behavior, model your

campaign metadata (e.g., source, medium, campaign) as utm_source, utm_medium, etc. This matches how Mixpanel’s SDKs capture UTM parameters by default.

No Distinct ID:

Ad performance data isn’t tied to individual users, so there’s no need for a Distinct ID. By omitting it, these events will not affect reports focused on user behavior, such as Funnels, Retention, Flows, unique user counts, and “did not doˮ cohorts.

Aggregated Event Properties:

Ad-data events are typically triggered once a day, and the event properties are aggregated (e.g., total clicks, impressions, and ad spend for the day). This is because ad networks only export data at aggregate levels and at fixed intervals, with daily granularity being the most common.

Insert ID:

Itʼs recommended to include the Insert ID property to avoid data duplication. This allows you to send the same campaign data multiple times for a specific segment without duplicating it in reports.

For more details on gathering data from ad networks, Mixpanel has guidesto help you.


Read more