Yes. LATAM is part of the Oneworld Alliance and Avianca (owner of Aerogal) belongs to Star Alliance. When booking, be sure to let your agent know your frequent flyer number. Otherwise, give your frequent flyer number to the agent at the ticket counter when checking in. Alternatively, should you forget to do either of these, hold on to your ticket stubs: you can accumulate miles by presenting them to the airline after your trip.