learning JavaScript attribution