Instagram ads are a very common promotional tool for many industries, especially ecommerce. Promoted ads are injected between the regular feed, presenting a user with a carousel of items to click on and potentially purchase. Instagram offers advertisers an ad targeting algorithm based on internal data, such as user behaviors and shopping preferences, on Meta’s social media platform, as well as an option to include external tracking information from other sources.
The effectiveness of Instagram ads can be optimized by leveraging AI tools for product recommendations. Trends is a set of new models within Algolia Recommend that enable teams to create experiences that can dynamically adapt to emerging trends, removing the need for manual editorial curation.
Recommend provides builders with two new APIs focused on trends:
Those 2 models can be combined to recommend “trending items per facet name”
The benefits of the Trends model are in discovering early trends, such as product demand growing over time, as opposed to the constant high-demand products like typical best sellers. For highly competitive industries, such as retail, fashion, and beauty, detecting new trends early is a game changer, directly impacting the revenue and brand credibility.
From the customer experience perspective, the immediate benefit is the consistency seen across marketing and promotional assets, on all channels. Customers see the same products recommended to them on the website, while browsing social media, and when they receive promotional emails featuring recommended products. Consistency is key.
Instagram offers several options for ad content promotion. With the classic Instagram Ads, the content is selected manually by the advertiser and served by Instagram to the chosen target audiences. The Dynamic Ads option lets advertisers leverage external tracking data in addition to the internal Instagram user behavior data. We will start with integrating Algolia Recommend models with classic Instagram ads and then discuss the enhancement possibilities with dynamic ads.
To start integrating Algolia Recommend with Instagram ads, you will need to follow a two step process.
Step 1: Algolia set up
Step 2: Instagram set up
from algoliasearch.recommend_client import RecommendClient algolia_app_id = '' algolia_api_key = ' ' algolia_index_name = ' ' recommend_client = RecommendClient.create(app_id, api_key) recommendations = recommend_client.get_recommendations( queries=[ { 'indexName': algolia_index_name, 'model': 'trending-items', } ] ) trending_product_skus = [product['sku'] for product in recommendations['results'][0]['hits']]
view rawfetch_trending_product_skus.py hosted with ❤ by GitHub
import requests facebook_api_version = 'v14.0' facebook_catalog_id = '' facebook_api_token = ' ' res = requests.post( f'https://graph.facebook.com/{api_version}/{product_catalog_id}/product_sets', json={ 'access_token': facebook_api_token, 'name': 'Trending products', 'filter': { 'retailer_id': { 'is_any': trending_product_skus } } } ) trending_product_set_id = res.json()['id']
view rawfetch_trending_product_skus.py hosted with ❤ by GitHub
import requests facebook_api_version = 'v14.0' facebook_api_token = '' # The `product_set_id` is obtained during the creation of the product set, refer to the `create_product_set.py` file. facebook_product_set_id = '' # Refer to the `fetch_trending_product_skus.py` file for fetching the trending products. trending_products = [] requests.post( f'https://graph.facebook.com/{version}/{product_set_id}/', json={ 'access_token': facebook_api_token, 'filter': { "retailer_id": { "is_any": [product['sku'] for product in trending_products] } } } )
view rawfetch_trending_product_skus.py hosted with ❤ by GitHub
A common marketing tool used for targeted marketing campaigns is a customer data platform. CDPs like Segment, mParticle, and Google Tag Manager collect and unify first-party customer data from multiple sources and then leverage it for targeted and personalized marketing campaigns. When powering Instagram ads with Algolia Recommend Trending Products model, you can use your CDP to define dynamic audiences matching the facets of trending categories, automating the ad audience targeting process.
To integrate Algolia Recommend‘s Trending Products model with your Instagram ads, head to Algolia Code Exchange for implementation instructions, a code sample GitHub repository, and a demo. Or refer back to this blog post!
To implement this solution, you will need to activate Algolia Recommend and set up your Instagram product audiences. Once all of the configurations are completed, your social media ad targeting should become much more accurate and effective.
Powered by Algolia AI Recommendations