Made a lot of changes to fix errors.
Added google analytics lib.
Imports added.