smec market observer icon
smec Market Observer
Erfahren Sie mehr zur aktuellen Performance Ihrer Branche und nutzen Sie unsere Experten-Insights für bessere Entscheidungen.

Microsoft Advertising Budget Eater Script

Script zur Evaluierung von Long Tails und Non-Converters für Microsoft Text Ads

Microsoft Advertising Budget Eater Script illustration

Bereit mehr über Ihre Microsoft Text Ads Long Tail und Non-Converters zu erfahren?

Das “Budget Eater” Script für Microsoft Text Ads (früher Bing Ads) evaluiert den Long Tail und die Non-Converters der letzten 30 Tage. Es analysiert Ihre Search Kampagnen und bietet tiefe Einblicke in die Korrelationen zwischen Kosten, Conversions und den Long Tail. Zusätzlich erhalten Sie Einsicht, wie der Long Tail Ihren Umsatz beeinflusst und bekommen Statistiken über Ihre Non-Converters und Top-Converters. Fügen Sie das Script Ihrem Microsoft Ads Account hinzu und erhalten Sie umgehend ein Ergebnis. Der Code wird nichts an Ihren Microsoft Ads Kampagnen verändern – Er analysiert lediglich die bestehenden Daten und liefert eine automatische Auswertung der Kosten und Conversions.

Gratis Microsoft Ads Script herunterladen

Unverbindlich Potenziale entfesseln

Lesen Sie unsere Datenschutzrichtlinien.

Success image

Vielen Dank!

Nach unten scrollen und Script Code erhalten

Arrow down icon
/**
 * Microsoft Advertising Budget Eater Script         . * ・ 。゚☆━੧[ ✪ ᗜ ✪ ]⊃
 *
 * Overview: You can use this script to evaluate your Long Tail and your
 * non-converting keywords from the last 30 days (campaign type Search). The script will give you an impression
 * of the correlations between costs, conversions, and the Long Tail within
 * your Microsoft Advertising account.
 *
 * Author: smec Team [smarter-ecommerce.com]
 *
 * Version: 1.0
 * Changelog:
 * - version 1.0
 *  - Released initial version.
 * Updated: 19-02-2020
 *
 * Twitter: @smec
 * Email: [email protected]
 * (c) Smarter Ecommerce GmbH. All rights reserved.
 * License: MIT
 */

/* ============================== Preferences =============================== */

// Sets the number of conversions threshold for evaluating the Long Tail.
var LONG_TAIL_CONVERSIONS_THRESHOLD = 1;

var REPORTING_DATE_RANGE = "LAST_30_DAYS";

/* =============================== Execution ================================ */

function main() {
    var totalCost = 0;

    var result = {
        nonConverters: { count: 0, cost: 0 },
        longtail: { count: 0, cost: 0, conversions: 0, revenue: 0 },
        converters: { count: 0, cost: 0, conversions: 0, revenue: 0 }
    };

    var iterator1 = AdsApp.keywords()
        .withCondition('Conversions < 1')
        .forDateRange(REPORTING_DATE_RANGE)
        .get();        
    var iterator2 = AdsApp.keywords()
        .withCondition('Conversions >= 1')
        .withCondition('Conversions <= '+LONG_TAIL_CONVERSIONS_THRESHOLD)
        .forDateRange(REPORTING_DATE_RANGE)
        .get();
    var iterator3 = AdsApp.keywords()
        .withCondition('Conversions > '+LONG_TAIL_CONVERSIONS_THRESHOLD)
        .forDateRange(REPORTING_DATE_RANGE)
        .get();

    result.nonConverters.count = iterator1.totalNumEntities();

    // Get the total costs for all search campaigns
    var iterator0 = AdsApp.campaigns()
        .withCondition("Type = SEARCH_AND_CONTENT")
        .forDateRange(REPORTING_DATE_RANGE)
        .get();

    while (iterator0.hasNext()) {
        var campaign = iterator0.next();
        var metrics = campaign.getStats();
        totalCost += metrics.getCost();
    }   

    while (iterator2.hasNext()) {
        let keyword = iterator2.next();
        let kwStats = keyword.getStats();

        let conversions = kwStats.getConversions();
        let cost = kwStats.getCost();
        let revenue = kwStats.getRevenue();

        result.longtail.count += 1;
        result.longtail.conversions += conversions;
        result.longtail.cost += cost;
        result.longtail.revenue += revenue;
    }

    while (iterator3.hasNext()) {
        let keyword = iterator3.next();
        let kwStats = keyword.getStats();

        let conversions = kwStats.getConversions();
        let cost = kwStats.getCost();
        let revenue = kwStats.getRevenue();

        result.converters.count += 1;
        result.converters.cost += cost;
        result.converters.conversions += conversions;
        result.converters.revenue += revenue;
    }    

    result.nonConverters.cost = totalCost - (result.longtail.cost + result.converters.cost);

    var totalConversions = result.longtail.conversions + result.converters.conversions;
    var totalRevenue = result.longtail.revenue + result.converters.revenue;

  // In this part, the calculated result numbers are printed:
  Logger.log("Microsoft Ads Search campaigns report ("+REPORTING_DATE_RANGE+")");
  Logger.log("===========================\n");
  Logger.log("Number of keywords without conversions (Non-Converters): " + result.nonConverters.count);
  Logger.log("Number of keywords in Long Tail with up to "+LONG_TAIL_CONVERSIONS_THRESHOLD+" conversion(s): " + result.longtail.count);
  Logger.log("Number of keywords having more than "+LONG_TAIL_CONVERSIONS_THRESHOLD+" conversion(s): " + result.converters.count + "\n");
  Logger.log("===========================\n");
  Logger.log("Total costs: " + round(totalCost));
  Logger.log("- - - - - - - - - - - - - -\n");
  Logger.log("Cost for Non-Converters: " + round(result.nonConverters.cost) +
      " (" + round(percentage(result.nonConverters.cost, totalCost)) + "% from total cost)\n");
  Logger.log("Cost for Long Tail keywords: " + round(result.longtail.cost) +
      " (" + round(percentage(result.longtail.cost, totalCost)) + "% from total cost)\n");
  Logger.log("Cost for top converters (more than "+LONG_TAIL_CONVERSIONS_THRESHOLD+" conv.): " + round(result.converters.cost) +
      " (" + round(percentage(result.converters.cost, totalCost)) + "% from total cost)\n");
  Logger.log("===========================\n");               
  Logger.log("Total conversions: " + round(totalConversions));
  Logger.log("- - - - - - - - - - - - - -\n");
  Logger.log("Conversions from Long Tail keywords: " + round(result.longtail.conversions) +
      " (" + round(percentage(result.longtail.conversions, totalConversions)) + "% from total conversions)");
  Logger.log("Conversions from top converters (more than "+LONG_TAIL_CONVERSIONS_THRESHOLD+" conv.): " + round(result.converters.conversions) +
      " (" + round(percentage(result.converters.conversions, totalConversions)) + "% from total conversions)"); 
  Logger.log("===========================\n");
  Logger.log("Total Revenue: " + round(totalRevenue));
  Logger.log("- - - - - - - - - - - - - -\n");
  Logger.log("Revenue from Long Tail: " + round(result.longtail.revenue) +
      " (" + round(percentage(result.longtail.revenue, totalRevenue)) + "% from total revenue)\n");           
}

/**
 * A helper function which rounds the given number to 2 decimals.
 */
function round(number) {
  return Math.round(number * 100) / 100;
}

/**
 * A helper function which returns the percentage of a value for the given total value.
 */
function percentage(value, total) {
  return value / total * 100;
}

Der Code wurde erfolgreich in deine Zwischenablage kopiert.

Beliebte Google Ads Scripts

Martin Röttgerding

“Automation can take your PPC efforts to the next level – if you’re doing it right.”

Martin Röttgerding, Head of SEA – Bloofusion Germany

Jetzt unverbindliche Demo anfordern

Erfahren Sie was Whoop! für Sie leisten kann