Brief Google Analytics Update
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:
- Book landing page (/books/:slug)
- Bundle landing page (/bundles/:slug)
- 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’:
- ‘ShoppingCart’, ‘Added’, slug
- ‘ShoppingCart’, ‘Removed’, slug
- ‘ShoppingCart’, ‘MovedFromWishList’, slug
– Posted by Len Epp
Originally published at leanpub.com.