Do you know that you can keyframe the positions of any layer in After Effects just by clicking on it and moving around using Motion Sketch.
Motion Sketch is a tool in Adobe After Effects which can be accessed by changing your workspace to Animation. The job of this tool is to record the movement of a layer and convert it into position keyframes.
To use it, simply select the layer you want to move, under Motion Sketch tool box, click on the Start Capture button, now click and hold the layer and move it around, as soon as you let go of the mouse button, the entire movement will be processed into position keyframes.
Motion Sketch in After Effects