Brief Google Analytics Update

Leanpub
Leanpub
Feb 22, 2017 · 1 min read

by Len Epp

published Sep 08, 2015

Here’s some up-to-date info about using Google Analytics with Leanpub. For an awesome post explaining how to use Google Analytics, check out this post by Leanpub author Visnja Zeljeznjak.

Page Views

A page view is sent to Google Analytics from Leanpub when a user lands on:

  1. Book landing page (/books/:slug)
  2. Bundle landing page (/bundles/:slug)
  3. Checkout complete page (/cart_purchase/:uuid/thankyou) [UPDATE 2018/09/11: A Leanpub author has suggested this worked for him: (/cart_purchases\:uuid/download)]

Just to be clear, ‘slug’ is your book’s or your bundle’s slug, so for the book https://leanpub.com/lean, the slug is ‘lean’.

Events

Events in Google Analytics are broken up into 3 pieces: Category, Action, and Label (optional).

The events we send are as follows, using the category ‘ShoppingCart’, the actions ‘Added’, Removed’, and ‘MovedFromWishList’:

  1. ‘ShoppingCart’, ‘Added’, slug
  2. ‘ShoppingCart’, ‘Removed’, slug
  3. ‘ShoppingCart’, ‘MovedFromWishList’, slug

– Posted by Len Epp

blog comments powered by


Originally published at leanpub.com.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store