Join

Main navigation

Mixpanel event tracking using Google Tag Manager

Use this step-by-step guide to create Mixpanel tracking events using Google Tag Manager.

09Dec2014

Josip

Javascript Developer

Tags

How-to

Planet Drupal

Share

Use this step-by-step guide to create Mixpanel tracking events using Google Tag Manager.

Creating Google Tag Manager account

Signup to GTM using your Gmail account

On accounts page click "New account"

Set Account Name and Container Name

Click on "Web pages" and +Add Domain and add your site

Accept GTM Terms of Service Agreement to continue

GTM will give you code to paste it on every page on your website. Place it immediately after the opening <body> tag.

Creating Mixpanel account

Signup to Mixpanel

Create new project to get their javascript library

Save that library to add it to your site using Google Tag Manager.
(You can paste this snippet just before the </head> tag of your page, but we already added GTM code, so we can do it easily trough GTM tags)