Imagine working for a digital marketing agency, and the agency is approached by a massive online furniture retailer. They want to test your skills at creating large campaigns for all of their website. You are tasked with creating a prototype set of keywords for search campaigns for their sofas section. The client says that they want you to generate keywords for the following products:
- sofas
- convertible sofas
- love seats
- recliners
- sofa beds
The client is a low-cost retailer, offering many promotions and discounts. You will need to focus on such keywords. You will also need to move away from luxury keywords and topics, as you are targeting price-sensitive customers. Because they are going to be tight on budget, it would be good to focus on a tightly targeted set of keywords and make sure they are all set to exact and phrase match.
Based on the brief above you will first need to generate a list of words, that together with the products given above would make for good keywords. Here are some examples:
- Products: sofas, recliners
- Words: buy, prices
The resulting keywords: 'buy sofas', 'sofas buy', 'buy recliners', 'recliners buy', 'prices sofas', 'sofas prices', 'prices recliners', 'recliners prices'.
As a final result, you want to have a DataFrame that looks like this:
| Campaign | Ad Group | Keyword | Criterion Type |
|---|---|---|---|
| Campaign1 | AdGroup_1 | keyword 1a | Exact |
| Campaign1 | AdGroup_1 | keyword 1b | Exact |
| Campaign1 | AdGroup_2 | keyword 2a | Exact |
import pandas as pd# Products and modifiers
products = ['sofas', 'convertible sofas', 'love seats', 'recliners', 'sofa beds']
modifiers = [
'cheap', 'affordable', 'discount', 'sale', 'clearance',
'bargain', 'low cost', 'budget', 'value', 'inexpensive',
'promo', 'offer', 'deals', 'best price', 'price', 'buy',
'prices', 'under 200', 'under 300', 'under 500'
]
# Generate keyword combinations
keywords = []
for product in products:
for modifier in modifiers:
# Create both orderings (modifier + product and product + modifier)
keywords.append(f"{modifier} {product}")
keywords.append(f"{product} {modifier}")
# Remove duplicates and sort
unique_keywords = sorted(list(set(keywords)))
# Create DataFrame
keywords_df = pd.DataFrame({
'Campaign': 'SEM_Sofas',
'Ad Group': [prod for keyword in unique_keywords for prod in products if keyword.startswith(prod) or keyword.endswith(prod)][:len(unique_keywords)],
'Keyword': unique_keywords,
'Criterion Type': 'Exact'
})
# Ensure we have at least 60 keywords
print(f"Total keywords generated: {len(keywords_df)}")
# Save to CSV
keywords_df.to_csv('keywords.csv', index=False)
# Display sample
keywords_df.head(20)