functions to get device/referrer