added server side script for analytics tracking