0
0
Digital Marketingknowledge~30 mins

Quality Score and ad rank in Digital Marketing - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding Quality Score and Ad Rank
📖 Scenario: You are managing an online advertising campaign. You want to understand how Google decides which ads to show and in what order. This depends on two important concepts: Quality Score and Ad Rank.Quality Score measures how relevant and useful your ad is to users. Ad Rank determines your ad's position on the page based on your bid and Quality Score.
🎯 Goal: Build a simple model that shows how Quality Score and Ad Rank work together to decide ad positions.
📋 What You'll Learn
Create a dictionary called ads with three ads and their Quality Scores
Create a dictionary called bids with the same ads and their bid amounts
Calculate the Ad Rank for each ad by multiplying Quality Score and bid
Sort the ads by Ad Rank in descending order to show their positions
💡 Why This Matters
🌍 Real World
Advertisers use Quality Score and Ad Rank to optimize their ad campaigns and get better positions at lower costs.
💼 Career
Understanding these concepts is essential for digital marketers managing paid search campaigns and improving ad performance.
Progress0 / 4 steps
1
Create the ads Quality Score data
Create a dictionary called ads with these exact entries: 'Ad1': 7, 'Ad2': 5, 'Ad3': 8. These numbers represent the Quality Scores.
Digital Marketing
Need a hint?

Use curly braces to create a dictionary with the ad names as keys and their Quality Scores as values.

2
Add the bids for each ad
Create a dictionary called bids with these exact entries: 'Ad1': 2.5, 'Ad2': 3.0, 'Ad3': 1.8. These numbers represent the bid amounts in dollars.
Digital Marketing
Need a hint?

Use a dictionary to store the bid amounts for each ad, matching the ad names exactly.

3
Calculate the Ad Rank for each ad
Create a dictionary called ad_rank where each ad's rank is calculated by multiplying its Quality Score from ads by its bid from bids. Use a dictionary comprehension with ad as the key variable.
Digital Marketing
Need a hint?

Use a dictionary comprehension to multiply the Quality Score and bid for each ad.

4
Sort ads by Ad Rank to determine positions
Create a list called sorted_ads that contains the ads sorted by their Ad Rank in descending order. Use the sorted() function with ad_rank.items() and a lambda function to sort by the second item (the rank). Extract only the ad names in the sorted list.
Digital Marketing
Need a hint?

Use sorted() with a lambda to sort by the Ad Rank values in descending order, then extract the ad names.