Added Analytics codes with R and examples