Better logging and insert id fix.

Profile ID's are now entity_id + event_type