Budget Eater Script

Script zur Evaluierung des Long Tails und der Non-Converters

Budget Eater Script illustration

Was tragen Ihre Longtail-Produkte zum Erfolg bei?

Das “Budget Eater” Script evaluiert den Long Tail und die Non-Converters der letzten 30 Tage. Fügen Sie das Script Ihrem Google Ads Account hinzu und erhalten Sie umgehend ein Ergebnis. Der Code wird nichts an Ihren Google Ads Kampagnen verändern — Er analysiert lediglich die bestehenden Daten und liefert eine automatische Auswertung.

Eine detaillierte Beschreibung sowie eine Anleitung zur Verwendung des Scripts finden Sie hier: Google Shopping and the Long Tail

Gratis Google Ads Script herunterladen

Unverbindlich Potenziale entfesseln

Lesen Sie unsere Datenschutzrichtlinien.

Success image

Vielen Dank!

Nach unten scrollen und Script Code erhalten

Arrow down icon
/**
 * Budget Eater Script         . * ・ 。゚☆━੧[ ✪ ᗜ ✪ ]⊃
 *
 * Overview: You can use this script to evaluate your Long Tail and your
 * non-converters from the last 30 days. The script will give you an impression
 * of the correlations between costs, conversions, and the Long Tail within
 * your account.
 *
 * Author: smec Team [smarter-ecommerce.com]
 *
 * Version: 1.0
 * Changelog:
 * - version 1.0
 *  - Released initial version.
 * Updated: 27-04-2018
 *
 * 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 = 3;

var TIME_RANGE = "LAST_30_DAYS";

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

function main() {
  // Select cost and conversions for all products during the last 30 days.
  var report = AdWordsApp.report(
      "SELECT OfferId, Cost, Conversions, ConversionValue, Impressions " +
      "FROM SHOPPING_PERFORMANCE_REPORT " +
      "DURING "+ TIME_RANGE);

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

  // Iterate through all rows and categorize each product by the number of its conversions.
  var rows = report.rows();

  while (rows.hasNext()) {
    var row = rows.next();
    var conversions = parseFloat(row['Conversions'], 10);
    var cost = parseFloat(row['Cost'], 10);
    var conversionValue = parseFloat(row['ConversionValue'], 10);

    if (conversions < 1) {
        result.nonConverters.count += 1;
        result.nonConverters.cost += cost;
    } else if (conversions < LONG_TAIL_CONVERSIONS_THRESHOLD) {
        result.longtail.count += 1;
        result.longtail.conversions += conversions;
        result.longtail.cost += cost;
        result.longtail.conversionValue += conversionValue;
    } else {
        result.converters.count += 1;
        result.converters.cost += cost;
        result.converters.conversions += conversions;
        result.converters.conversionValue += conversionValue;
    }
  }

  var totalCost = result.nonConverters.cost + result.longtail.cost + result.converters.cost;
  var totalConversions = result.longtail.conversions + result.converters.conversions;
  var totalConversionValue = result.longtail.conversionValue + result.converters.conversionValue;

  // In this part, the calculated result numbers are printed:
  Logger.log("Shopping Ads (last 30 days)");
  Logger.log("---------------------------\n");
  Logger.log("Number of products without conversions: " + result.nonConverters.count);
  Logger.log("Number of products in Long Tail: " + result.longtail.count);
  Logger.log("Number of products having at least 3 conversions: " + result.converters.count + "\n");
  Logger.log("Total cost: " + round(totalCost));
  Logger.log("Cost for Non-Converters: " + round(result.nonConverters.cost) +
      " (" + round(percentage(result.nonConverters.cost, totalCost)) + "% from total cost)\n");
  Logger.log("Total conversion value: " + round(totalConversionValue));
  Logger.log("ROAS for Long Tail: " + round(result.longtail.conversionValue / result.longtail.cost) + "\n");
  Logger.log("Total conversions: " + round(totalConversions));
  Logger.log("Conversions from Long Tail: " + round(result.longtail.conversions) +
      " (" + round(percentage(result.longtail.conversions, totalConversions)) + "% from total conversions)");
}

/**
 * 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

Logo of Great Day for PPC Automation by smec
smec Headquarters at Tabakfabrik, Linz
Join the Europe's best-fit event for ambitious paid search marketers!
Join the Great Day!