add analytics linking, clean up analytics requires, add Apigee headers