Marketo API Driven Google Analytics Custom Dimensions

Marketo isn’t the best with reporting. I find their analytics to be quite janky, visually unappealing, and kind of annoying to build.

Something I’ve wanted to do for a while is build in Marketo data into our Google analytics. I did this using Google Analytics Custom Dimensions.

Because I previously integrated MODX  with Marketo I am now able to pass lead data to custom dimension parameters in the Google Analytics javascript snippet that they provide.

As an example here is what I’m currently running on Google Analytics.


	  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
	  ga('create', 'xx-xxxxxxx-x', 'auto');
	  ga('send', 'pageview', {

In this snippet I am measuring the email (unique lead identifier), industry, and salesperson of everyone that visits our site! This allows me to do some really neat stuff in google analytics when it comes to reporting, and I love me some google analytics reporting.


Screen Shot 2015-02-13 at 3.26.24 PM


Screen Shot 2015-02-13 at 3.24.58 PM

Salesperson Traffic

Salesperson Custom Dimension

Next up is measuring specific events, custom metrics, and other fun stuff. I’ll hopefully put up a post soon!¬†