This expression links the position (and optionally rotation) of a layer to an arbitrary point on a path or also to its Bezier handles. Works even if the path is nested into groups with non-default transforms!

Rotation
To orient the layer along the path, simply apply the expression to both position and rotation of the layer. You can still keyframe the rotation on top of the rotation generated by the expression.

Animate Along Path
To animate any layer along a path in After Effects, you need to

  1. make sure mode is set to percentage
  2. link the Attach Point parameter to a slider (by clicking on the chain link icon right before it)
  3. Keyframe the linked slider from 0 to 100 to move from the beginning to the end of the path.

Link to Point on Shape iExpression

by default applied to: 
position
rotation
can be applied to: 
1D properties
2D properties
iExpression Bundle: 
Download at aescripts.com

What are iExpressions?

iExpressions are After Effects expressions with an easy to use interface.