Home > Technical & Creative Skills > Programming, Servers & Scripts

⇒ Google Analytics Framework ( works on Pops really well ) ⇐ (1)


10-01-2017 04:07 PM #1 danielt (Member)
⇒ Google Analytics Framework ( works on Pops really well ) ⇐

want to share with you guys a small Google Analytics framework I made so we don't have to use the
standard Google Analytics framework, for 2 reasons:

1. you load google code on your landers - not cool
2. you get 1 extra call to an outside service

the framework uses the Google Analytics Hit API and it's basically just a 1 way road: you just post
data to your Analytics account, without exposing other user data to Google.

There are 2 versions, 1 is the un minified version with 2 examples at the bottom and 1 minified, ready for
copy / pasting in your landers.

it works really well on pops where you can put it there as it has very little kb and you can see stuff in real time
( how many users, clicks on a CTA, etc )

be careful if you're doing volumes on pops when sending events, as you may reach the Google Analytics threshold really fast and you
can't track stuff anymore after that point.

The expanded code is here Google Analytics Framework - Expanded
and the minified code is here Google Analytics Framework - Minified

The best part is that all this great functionality is under 2kb - take that nasty pops that need fast loading.

OFC this can be used allover the place in any type of lander. There is a small cookie ( get | set ) function that sets
a random CID ( client id ) for subsequent events to be associated with the same user

let me know if you need help with it ( thought it's pretty much self explanatory )

daniel


Home > Technical & Creative Skills > Programming, Servers & Scripts