Bird
Raised Fist0
Digital Marketingknowledge~5 mins

Retargeting and remarketing in Digital Marketing - Time & Space Complexity

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Time Complexity: Retargeting and remarketing
O(n)
Understanding Time Complexity

When running retargeting and remarketing campaigns, it is important to understand how the time and effort needed grow as your audience size increases.

We want to know how the work involved changes when you target more users.

Scenario Under Consideration

Analyze the time complexity of the following campaign process.


// For each user in the audience list
for user in audience_list:
    # Check if user visited the website
    if user.visited_website:
        # Show personalized ad
        show_ad(user)
    # Else, do nothing

This code checks each user to see if they visited the website and then shows them a personalized ad if they did.

Identify Repeating Operations
  • Primary operation: Looping through each user in the audience list.
  • How many times: Once for every user in the list.
How Execution Grows With Input

As the number of users grows, the number of checks and ads shown grows at the same rate.

Input Size (n)Approx. Operations
1010 checks and possible ads
100100 checks and possible ads
10001000 checks and possible ads

Pattern observation: The work grows directly with the number of users.

Final Time Complexity

Time Complexity: O(n)

This means the time to run the campaign grows in a straight line as the audience size grows.

Common Mistake

[X] Wrong: "Showing ads to more users only takes a little more time because ads are automated."

[OK] Correct: Even automated ads require checking each user's data, so more users mean more work and time.

Interview Connect

Understanding how campaign effort grows with audience size helps you plan better and shows you can think about efficiency in marketing tasks.

Self-Check

"What if we grouped users by behavior first and then showed ads to groups instead of individuals? How would the time complexity change?"

Practice

(1/5)
1. What is the main purpose of retargeting and remarketing in digital marketing?
easy
A. To bring back visitors who showed interest but didn't buy
B. To attract completely new visitors to the website
C. To increase website loading speed
D. To improve the website design

Solution

  1. Step 1: Understand the goal of retargeting and remarketing

    These strategies focus on visitors who already showed interest but did not complete a purchase.
  2. Step 2: Compare options to the goal

    Only To bring back visitors who showed interest but didn't buy matches this goal, while others focus on unrelated website improvements or new visitors.
  3. Final Answer:

    To bring back visitors who showed interest but didn't buy -> Option A
  4. Quick Check:

    Retargeting = bring back interested visitors [OK]
Hint: Retargeting targets past visitors, not new ones [OK]
Common Mistakes:
  • Confusing retargeting with attracting new visitors
  • Thinking it improves website speed or design
2. Which of the following is a common method used to track visitors for retargeting?
easy
A. Changing website background color
B. Using a small tracking code or pixel on the website
C. Increasing website font size
D. Sending emails to random users

Solution

  1. Step 1: Identify tracking methods in retargeting

    Retargeting uses a small code snippet or pixel placed on the website to track visitors.
  2. Step 2: Eliminate unrelated options

    Options A, B, and C do not involve tracking visitors for ads.
  3. Final Answer:

    Using a small tracking code or pixel on the website -> Option B
  4. Quick Check:

    Tracking code = retargeting method [OK]
Hint: Tracking pixels are key for retargeting [OK]
Common Mistakes:
  • Confusing tracking with unrelated website changes
  • Thinking email spam is retargeting
3. Consider this scenario: A user visits an online store but leaves without buying. Later, they see ads for the same store on social media. What is this an example of?
medium
A. Content marketing
B. Search engine optimization
C. Email marketing
D. Retargeting

Solution

  1. Step 1: Analyze the scenario

    The user visits but does not buy, then sees ads later for the same store.
  2. Step 2: Match scenario to marketing strategies

    Showing ads to previous visitors is retargeting, not SEO, email, or content marketing.
  3. Final Answer:

    Retargeting -> Option D
  4. Quick Check:

    Ads to past visitors = Retargeting [OK]
Hint: Ads after visit = retargeting, not SEO or email [OK]
Common Mistakes:
  • Confusing retargeting with SEO or email campaigns
  • Thinking content marketing shows ads to past visitors
4. A marketer set up a retargeting campaign but notices no ads are shown to past visitors. What could be a likely error?
medium
A. The ads are too colorful
B. The website has too many visitors
C. The tracking pixel was not added to the website
D. The website uses HTTPS

Solution

  1. Step 1: Identify key setup for retargeting

    Retargeting requires a tracking pixel on the website to collect visitor data.
  2. Step 2: Evaluate possible errors

    If no ads show, missing the pixel is the most likely cause. Other options do not prevent ads from showing.
  3. Final Answer:

    The tracking pixel was not added to the website -> Option C
  4. Quick Check:

    Missing pixel = no retargeting ads [OK]
Hint: No pixel means no retargeting ads [OK]
Common Mistakes:
  • Blaming website traffic volume
  • Thinking HTTPS blocks retargeting
  • Assuming ad design affects ad delivery
5. A company wants to increase sales by showing ads only to visitors who added items to their cart but didn't buy. Which strategy best fits this goal?
hard
A. Retargeting ads focused on cart abandoners
B. Generic display advertising to all internet users
C. Email newsletters to all subscribers
D. SEO optimization for search engines

Solution

  1. Step 1: Understand the target audience

    The company wants to reach visitors who added items to cart but did not complete purchase.
  2. Step 2: Match strategy to audience

    Retargeting ads focused on cart abandoners specifically target this group, unlike generic ads, emails, or SEO.
  3. Final Answer:

    Retargeting ads focused on cart abandoners -> Option A
  4. Quick Check:

    Target cart abandoners = retargeting ads [OK]
Hint: Target cart abandoners with retargeting ads [OK]
Common Mistakes:
  • Using broad ads instead of focused retargeting
  • Confusing email newsletters with retargeting
  • Thinking SEO targets specific past visitors