By writing Liquid scripts, you can manipulate product data, cart items, and other variables to implement custom logic for your free gift promotions. You can refer to the Shopify document about
Product Discount API for more information.
In essence, when deciding how to add free gift with purchase on Shopify, it is essential to consider your technical skills, budget, and desired features.
If you're new to Shopify or prefer a simple approach, built-in features might be the best choice. For greater customization and integration, third-party apps or custom scripting can be effective options. However, these methods may require additional technical knowledge or costs.