Added analytics directly on the template