Added dynamic code for analytics